CentOS7下安装Jenkins
一、准备
- 基础环境
[root@333fc545a958 ~]# uname -r
3.10.0-514.el7.x86_64
[root@333fc545a958 ~]# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)
- yum安装依赖
[root@333fc545a958 ~]# yum install java
二、yum安装Jenkins
[root@333fc545a958 ~]# wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
[root@333fc545a958 ~]# rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
[root@333fc545a958 ~]# yum install jenkins -y
- 启动Jenkins
[root@333fc545a958 ~]# systemctl start jenkins
注意:如果启动失败,
systemctl status jenkins
查看失败原因。