2.复制并解压tomcat
tar -zxf apache-tomcat-8.5.37.tar.gz
3.创建tomcat管理用户并授权文件目录
[root@localhost local]# useradd tomcat
[root@localhost local]# chown -R tomcat:tomcat apache-tomcat-8.5.37/
4.复制Jenkins war包到webapps文件夹
cp jenkins.war /usr/local/apache-tomcat-8.5.37/webapps/
5.修改jenkins.war权限
chown -R tomcat:tomcat jenkins.war
6.启动tomcat
./startup.sh
7.访问jenkins
http://10.10.95.3:8080/jenkins
8.jenkins首次登录,输入admin密码
[tomcat@localhost bin]$ cat /home/tomcat/.jenkins/secrets/initialAdminPassword
6d8f76efad0c4c009c6e9805e6035ecf
9.解决jenkins离线问题
浏览器访问:http://xx.xx.xx.xx:8080/jenkins/pluginManager/advanced
修改Update Site为:http://updates.jenkins.io/update-center.json
10.解决jenkins首次登录后一片空白
/root/.jenkins/config.xml 中的配置修改为:
11.配置Jenkins的maven项目插件
直接安装 :Maven Integration、SonarQube Scanner、Publish Over SSH
12.配置Jenkins 工作空间