Centos7安装Jenkins

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

4、访问:http://localhost:8080

5、解锁jenkins,将指定目录的文件粘贴到页面解锁

6、安装建议的插件

7、将Jenkins设置成中文,安装插件local

    原文作者:Okami_
    原文地址: https://www.jianshu.com/p/77ff3710c0f2
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞