
[root@bogon tomcat]# cp -r webapps/ webapps_backup
[root@bogon tomcat]# ls
bin BUILDING.txt conf CONTRIBUTING.md lib LICENSE logs NOTICE README.md RELEASE-NOTES RUNNING.txt temp webapps webapps_backup work
[root@bogon tomcat]# cd webapps
[root@bogon webapps]# ls
docs examples host-manager manager ROOT
[root@bogon webapps]# rm -rf ./*
[root@bogon webapps]# ls
[root@bogon webapps]# ls
[root@bogon webapps]# mkdir jenkins
[root@bogon webapps]#
[root@bogon webapps]# ls
jenkins ROOT#把ROOT拿回来吧
[root@bogon webapps]#
[root@bogon webapps]# cd jenkins/
[root@bogon jenkins]# ls
[root@bogon jenkins]# ls

[root@bogon jenkins]# ls
jenkins.war
[root@bogon jenkins]#
[root@bogon jenkins]# jar -xvf jenkins.war
[root@bogon jenkins]# ls
bootstrap css executable help jenkins.war jsbundles LogFileOutputStream$2.class Main.class MainDialog$1.class Main$FileAndDescription.class robots.txt WEB-INF
ColorFormatter.class dc-license.txt favicon.ico images JNLPMain.class LogFileOutputStream$1.class LogFileOutputStream.class MainDialog$1$1.class MainDialog.class META-INF scripts winstone.jar
[root@bogon jenkins]#
[root@bogon jenkins]# vim /etc/profile
#jenkins配置
export JENKINS_HOME=/usr/local/tomcat/webapps/jenkins
[root@bogon jenkins]# source /etc/profile
[root@bogon bin]# pwd
/usr/local/tomcat/bin
[root@bogon bin]# ./shutdown.sh
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr/local/jdk/
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
[root@bogon bin]# ./startup.sh
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr/local/jdk/
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Tomcat started.
[root@bogon bin]#

根据路径去找口令,拿过来继续
[root@bogon bin]# more /usr/local/tomcat/webapps/jenkins/secrets/initialAdminPassword
438536dcae7f4d2fb908f6dd13d0927d
[root@bogon bin]#
好了根据提示一路走下去就可以
