1、安装:
sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
yum install jenkins
2、启停:
/etc/init.d/jenkins start
/etc/init.d/jenkins stop
- 如果早启动的时候失败,在启动之前,可以尝试修改/etc/rc.d/init.d/jenkins中java的目录
[root@master init.d]# /etc/init.d/jenkins start
Starting jenkins (via systemctl): Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.
vim /etc/rc.d/init.d/jenkins
- 启动之后如果有如下Warning,可以尝试执行
systemctl daemon-reload
[root@master init.d]# /etc/init.d/jenkins start
Starting jenkins (via systemctl): Warning: jenkins.service changed on disk. Run 'systemctl daemon-reload' to reload units.
[ 确定 ]
3、安装目录: /var/lib/jenkins日志目录:/var/log/jenkins/jenkins.log
5、解锁jenkins,将指定目录的文件粘贴到页面解锁
6、安装建议的插件
7、将Jenkins设置成中文,安装插件local