yum install -y java-11-openjdk*
wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo --no-check-certificate rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
#安装jenkins yum install -y jenkins
修改配置文件
vim /etc/sysconfig/jenkins JENKINS_USER="root" JENKINS_PORT="8888"
systemctl start jenkins
启动失败,jerkins服务启动时间较长,超过了一定时间就会被systemd认定启动失败,可以通过修改/usr/lib/systemd/system/jenkins.service文件
vim /usr/lib/systemd/system/jenkins.service # 修改TimeoutStartSec=0 systemctl daemon-reload systemctl start jenkins
六、访问页面
页面无法正常访问
netstat -nltp 查看修改的端口发现没有生效,没有监听8888端口
sdakjdkadwiaii