一、安装java环境
yum install -y java-11-openjdk*

三、将Jenkins存储库添加到yum repos
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
#安装jenkins
yum install -y jenkins

修改配置文件
vim /etc/sysconfig/jenkins
JENKINS_USER="root"
JENKINS_PORT="8888"

五、启动Jenkins
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
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/tech/aiops/280210.html