jenkins的最新版本已经不在支持jdk8,支持的jdk环境如下:
-
安装jdk环境
yum -y install java-11-openjdk.x86_64 java-11-openjdk-devel.x86_64
-
安装tomcat
tomcat官网cd /opt wget https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.82/bin/apache-tomcat-9.0.82.tar.gz tar -xvf apache-tomcat-9.0.82.tar.gz mv apache-tomcat-9.0.82 apache-tomcat-jenkins rm -rf apache-tomcat-jenkins/webapps/*
-
下载jenkins
cd /opt/apache-tomcat-jenkins/webapps wget https://get.jenkins.io/war-stable/2.414.3/jenkins.war mv jenkins.war ROOT.war
-
启动jenkins
/opt/apache-tomcat-jenkins/bin/startup.sh
-
tomcat默认端口是8080,使用ip:8080访问到jenkins
-
修改jenkins默认存储路径
vim /opt/apache-tomcat-jenkins/bin/catalina.sh
重新启动tomcat即可