1.安装Jenkins:
下载:wget https://pkg.jenkins.io/redhat-stable/jenkins-2.249.3-1.1.noarch.rpm
安装:rpm -ivh jenkins-2.249.3-1.1.noarch.rpm
2.修改端口号(默认8080)
vim /etc/sysconfig/jenkins-->JENKINS_PORT="8011"
3.启动/重启/停止/查看状态
systemctl start jenkins
systemctl restart jenkins
systemctl stop jenkins
systemctl status jenkins
4.问题解决
在启动jenkins时,有可能出现报错:Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.
====解决方法:1)echo $JAVA_HOME(java环境变量);2)vim /etc/init.d/jenkins,在candidates中添加java环境变量;3)systemctl daemon-reload;4)systemctl restart jenkins
上述为本人参考网上的步骤进行总结,如有侵权,请联系我删除