查看Jenkinsg最新稳定版

https://pkg.jenkins.io/redhat-stable/

yum 方式安装

1.下载依赖

1
sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo

2.导入秘钥

1
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key

3.安装

1
yum install jenkins

查看jenkins安装路径

1
2
3
4
5
6
7
8
9
10
11
rpm -ql jenkins

/etc/init.d/jenkins
/etc/logrotate.d/jenkins
/etc/sysconfig/jenkins
/usr/lib/jenkins
/usr/lib/jenkins/jenkins.war
/usr/sbin/rcjenkins
/var/cache/jenkins
/var/lib/jenkins
/var/log/jenkins

/usr/lib/jenkins/:jenkins安装目录,war包会放在这里。
/etc/sysconfig/jenkins:jenkins配置文件,“端口”,“JENKINS_HOME”等都可以在这里配置。
/var/lib/jenkins/:默认的JENKINS_HOME。
/var/log/jenkins/jenkins.log:jenkins日志文件。

启动/停止

1
2
sudo service jenkins start/stop/restart
sudo chkconfig jenkins on

查看jenkins状态

1
systemctl status jenkins

其他

将jenkins用户添加进docker用户组

1
2
sudo usermod -aG docker jenkins
sudo systemctl restart jenkins


  • 本博客所有文章除特别声明外,均采用CC-BY-NC-SA 4.0 许可协议进行许可
  • 欢迎转载,但请注明来自稻草人,并保持转载后文章内容的完整,本人保留所有版权相关权利。

本文链接:http://www.googol.tech/2017/11/16/CentOS-7安装Jenkins/