1、JDK切换成1.8
#查看当前java的版本
java -versinon
#进入本地jdk1.8目录
cd /Users/lixiaobing/Documents/伺客文档/客户/gl/软件安装/java
#服务器创建安装包目录
mkdir -p /var/software/jdk
#拷贝安装包到服务器
scp -r jdk-8u131-linux-x64.tar.gz root@cust_tbj:/var/software/jdk
chmod +x jdk-8u131-linux-x64.tar.gz
tar -zxvf jdk-8u131-linux-x64.tar.gz
#配置环境变量JDK1.8生效,配置JAVA_HOME、CLASS_PATH
vim .bash_profile
export JAVA_HOME=/var/software/jdk/jdk1.8.0_131
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
#PATH中增加$JAVA_HOME/bin
PATH=$JAVA_HOME/bin:
source ~/.bash_profile
java -version
2、安装TOMCAT
#服务端创建安装包目录
mkdir -p /var/software/tomcat
scp apache-tomcat-8.5.4.zip root@cust_tbj:/var/software/tomcat
chmod +x apache-tomcat-8.5.4.zip
unzip apache-tomcat-8.5.4.zip
cd /var/software/tomcat/apache-tomcat-8.5.4/bin
chmod +x *.sh
vim ~/.bash_profile
TOMCAT_HOME=/var/software/tomcat/apache-tomcat-8.5.4
PATH=$PATH:$HOME/bin:$TOMCAT_HOME/bin
source ~/.bash_profile
ln -s /var/software/tomcat/apache-tomcat-8.5.4/bin/catalina.sh tomcat
3、部署Jenkins的WAR包
scp jenkins.war root@cust_tbj:/var/software/tomcat/apache-tomcat-8.5.4/webapps