上传jenkins.war包
[root@java-tomcat1 ~]# ls
jenkins.war
[root@java-tomcat1 ~]# cd /usr/local/tomcat #进入tomcat目录
[root@java-tomcat1 tomcat]# cp -r webapps/ /opt/ #将原来的发布网站目录备份
[root@java-tomcat1 tomcat]# cd webapps/
[root@java-tomcat1 webapps]# ls
docs examples host-manager manager ROOT
[root@java-tomcat1 webapps]# rm -rf * #清空发布网站里面的内容
[root@java-tomcat1 webapps]# cp /root/jenkins.war ./ #将war包拷贝到当前目录
[root@java-tomcat1 webapps]# ../bin/startup.sh #启动
Using CATALINA_BASE: /data/application/tomcat
Using CATALINA_HOME: /data/application/tomcat
Using CATALINA_TMPDIR: /data/application/tomcat/temp
Using JRE_HOME: /usr/local/java
Using CLASSPATH: /data/application/tomcat/bin/bootstrap.jar:/data/application/tomcat/bin/tomcat-juli.jar
Tomcat started.
[root@java-tomcat1 webapps]# ls
jenkins jenkins.war
#这个下面有就可以在浏览器上进行:192.168.10.142:8080/jenkins访问
[root@java-tomcat1 webapps]# ../bin/shutdown.sh #关闭tomcat
[root@java-tomcat1 ~]# cd /uer/local/tomcat/webapps/
[root@java-tomcat1 webapps]# mkdir ROOT #创建一个ROOT目录存放war包
[root@java-tomcat1 webapps]# ls
ROOT
[root@java-tomcat1 webapps]# cp -r /jenlins/* ./ROOT
[root@java-tomcat1 ROOT]#ls
#这个下面有就可以在浏览器上进行:192.168.10.142:8080访问