linux下jenkins+tomcat

1, the installation jdk

Upload the installation package usr / local

Decompression

Configuration environment variable

vim /etc/profile

export JAVA_HOME=/usr/local/jdk1.8.0_131

export CLASSPATH=$:CLASSPATH:$JAVA_HOME/lib/

export PATH=$PATH:$JAVA_HOME/bin

 

After you have finished editing, save and exit, and then enter the following command to refresh environment configuration to take effect source / etc / profile

Verify successful java -version

 

2, tomcat installation

1) Download the archive of tomcat

         tar -zxvf apache-tomcat-8.5.29.tar.gz

(2) Copy the file to the tomcat / opt directory and rename

         mv apache-tomcat-8.5.29 /opt

         cd / opt

         mv apache-tomcat-8.5.29  tomcat8

(3) Add the environment variable to boot script file

        cd tomcat8 / bin

        we startup.sh

        JAVA_HOME=/usr/java/jdk1.8.0_161

        JRE_HOME=/usr/java/jdk1.8.0_161/jre

        PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME:$PATH

        CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

        TOMCAT_HOME=/opt/tomcat8

(4) Start tomcat

        ./startup.sh

5) Verify whether to start up tomcat

Open a browser to access: ip Address: 8080, tomcat normal information page displayed, the configuration is successful

 

problem:

Ali cloud server I use, after tomcat configured, then the machine can not access the page, Solution: Configure Ali cloud instance security group

1, Example - Management - this Example Security Group - Configuration Rules - rules add the security group

 

 

3, install jenkins

(1) copy of jenkins.war to webapps tomcat

cd /opt/tomcat8/webapps

Then jenkins.war on here

(2) Configuration Environment Variables

vi /etc/profile

export JENKINS_HOME=/opt/tomcat8/webapps/

(3) save and exit the settings to take effect

source /etc/profile

(4) Start tomcat

cd /opt/tomcat8/bin

./startup.sh

 

5) access jenkins

Browser to open http: // ip: 8080 / jenkins /, that is, into jenkins page

Password exist in: / opt / tomcat9 / webapps / jenkins / secrets / initialAdminPassword

Open the file to copy the password to the password field landed on the line

Guess you like

Origin www.cnblogs.com/bendouyao/p/12120937.html