1、添加Jkens源
sudo wget -O /etc/yum.repos.d/jenkins.repo http://jenkins-ci.org/redhat/jenkins.repo
sudo rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
2、下载
sudo wget -O /etc/yum.repos.d/jenkins.repo http://jenkins-ci.org/redhat/jenkins.repo
3、启动
sudo service jenkins start
问题:
Job for jenkins.service failed because the control process exited with error code. See “systemctl status jenkins.service” and “journalctl -xe” for details.
解决:
原因:输入 systemctl status jenkins.service 查看错误信息。没有找到java配置
打开:vim /etc/init.d/jenkins 配置java环境变量