tomcat下jenkins安装

1、准备工作:先下载
a、tomcat-8.5.29
b、java:1.8.0
c、Jenkins 2.138.3(.war)

2、将下载的jenkins.war保存到tomcat\apache-tomcat-8.5.29\webapps目录下
3、启动tomcat,\tomcat\apache-tomcat-8.5.29\bin\startup.bat

可能存在的问题:
A:端口被占用
解决方法:定位到安装目录:\tomcat\apache-tomcat-8.5.29\conf\server.xml,修改对应的端口号:
tomcat下jenkins安装
B:报org.apache.catalina.webresources.Cache.getResource Unable to add the resource at […] to the cache because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache错误
解决方法:定位到安装目录:\tomcat\apache-tomcat-8.5.29\conf\context.xml
tomcat下jenkins安装
添加:<Resources cachingAllowed="true" cacheMaxSize="100000" />
C:提示:“Jenkins正在启动,请稍后… …”
解决方法:定位到jenkins的工作目录:C:\Users\Administrator.jenkins\hudson.model.UpdateCenter.xml
把对应的http://updates.jenkins-ci.org/update-center.json修改为http://mirror.xmission.com/jenkins/updates/update-center.json
再定位到:C:\Users\Administrator.jenkins\updates\default.json
把对应的"connectionCheckUrl":"http://www.google.com/"的value修改为http://www.baidu.com

修改完成后,再次启动tomcat,访问:http://localhost:8090/jenkins
出现如下页面证明启动成功。
tomcat下jenkins安装
输入提示路径的密码,即可完成登陆。