1. Install jdk8.0

  • Download jdk8.0
https://ftp-new-pc.pconline.com.cn/pub/download/201903/pconline1552198052014.zip?md5=Dv6EA6OPkM2TLsDT27GYXw&expires=1646 537688Copy the code

Download down is an EXE file, directly click step by step installation can be. If you want to install to another directory, select the corresponding directory. Here you install to

C: \ Jenkins \ jdk1.8Copy the code
  • Configuring environment Variables

JVAV_HOME

JAVA_HOME = C: \ Jenkins \ jdk1.8Copy the code

PATH

path=%PATH%; C: \ Jenkins \ jdk1.8 \ binCopy the code

2. Install Tomcat 8.x

  • Download Tomcat 8.5
https://tomcat.apache.org/download-80.cgi
Copy the code
  • The installation

Directly unzip to the corresponding directory, here unzip to

C: \ Jenkins \ tomcat 8.5Copy the code

3. Install the Jenkins

  • download
https://mirrors.tuna.tsinghua.edu.cn/jenkins/war-stable/2.319.3/jenkins.war
Copy the code
  • Install Jenkins. War

Copy jenkins.war to the Tomcat installation directory

C: \ Jenkins \ tomcat 8.5 \ webappsCopy the code
  • Start Tomcat

Click launch script

C: \ Jenkins \ tomcat 8.5 \ bin \ startup batCopy the code

If a flash occurs during the click, the startup fails. To view the problem, open a CMD command line window and execute

C: \ Jenkins \ tomcat 8.5 \ bin \ startup batCopy the code

If the following error occurs

C: Jenkins \tomcat-8.5\bin>startup.bat Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least One of these environment variables is needed to run this program C: Jenkins \tomcat-8.5\bin>Copy the code

Modify the startup script and add a line set JAVA_HOME=C:\ Jenkins \jdk1.8; The approximate position is as follows

Setlocal REM Guess CATALINA_HOME if not defined set JAVA_HOME=C: Jenkins \jdk1.8Copy the code

Run the startup.bat startup script again and you’re done. After the startup is complete, the following information is displayed in the log startup window

Please use the following password to proceed to installation: cd929f2ca9f4462e99a1dde6990d8977 This may also be found at: C:\Users\Administrator.jenkins\secrets\initialAdminP assword * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *Copy the code

Then, close Tomcat once using the following shutdown script. It is also possible to encounter the same problems as startup scripts. Add the JAVA_HOME variable in the same way

C: \ Jenkins \ tomcat 8.5 \ bin \ shutdown batCopy the code

Delete jenkins.war from the following directory

C: \ Jenkins \ tomcat 8.5 \ webapps \Copy the code

Since jenkins.war has been compressed into a directory during the first startup, it is easy to delete jenkins.war. Delete it and start Tomcat again

4. Configuration Jenkins

  • Visit Jenkins
http://127.0.0.1:8080/jenkins
Copy the code

Find the file above and open it; Fill in the password and proceed

C:\Users\Administrator.jenkins\secrets\initialAdminPassword
Copy the code

Next, simply choose to install the recommended plug-ins. Waiting for installation

Configure an administrator. The administrator’s name is admin. After typing, click Save and finish

The next step is to simply click Save and finish. Finally, Jenkins has been installed, and the address is as follows:

http://127.0.0.1:8080/jenkins/
Copy the code