Linux jenkins deployment tutorial, linuxjenkins
Jenkins was formerly known as hudson. The former is an open-source free version, and the latter is used for the commercial version.
Install jdk (the installation package can be downloaded directly from the official website)
tar -zxvf jdk-8u151-linux-i586.tar.gzmkdir -p /usr/java/mv jdk1.8.0_151 /usr/java/
Add
export JAVA_HOME=/usr/java/jdk1.8.0_151export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/libexport PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$HOMR/bin
Make the environment variables take effect and check the java version. if the version is displayed, the jdk is successfully installed.
[root@localhost java]# source /etc/profile[root@localhost java]# java -versionjava version "1.8.0_151"Java(TM) SE Runtime Environment (build 1.8.0_151-b12)Java HotSpot(TM) Client VM (build 25.151-b12, mixed mode)[root@localhost java]#
Tomcat deployment (the installation package can be directly downloaded from the official website)
tar -zxvf apache-tomcat-8.5.9.tar.gzmv apache-tomcat-8.5.9 tomcatmv tomcat /usr/local/
Start tomcat and access it in the browser
cd /usr/local/tomcat/bin./startup.sh
Jenkins deployment (the installation package can be directly downloaded from the official website)
mv /usr/local/tomcat/webapps/ROOT /usr/local/tomcat/webapps/ROOT.bakmkdir -p /usr/local/tomcat/webapps/ROOTmv jenkins.war /usr/local/tomcat/webapps/ROOT/cd /usr/local/tomcat/webapps/ROOT/jar -xvf jenkins.war
Restart tomcat
sh /usr/local/tomcat/bin/shutdown.shsh /usr/local/tomcat/bin/startup.sh
Browser access
1)
2)
Jenkins deployment completed