centos下搭建Jenkins持续集成环境(安装jenkins)
1、安装JDK
yum install -y java
2、安装jenkins
添加Jenkins库到yum库,Jenkins将从这里下载安装。
1 wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
2 rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
3 yum install -y jenkins
如果不能安装就到官网下载jenkis的rmp包,官网地址(http://pkg.jenkins-ci.org/redhat-stable/)
1 wget http://pkg.jenkins-ci.org/redhat-stable/jenkins-2.7.3-1.1.noarch.rpm
2 rpm -ivh jenkins-2.7.3-1.1.noarch.rpm
配置jenkis的端口
vi /etc/sysconfig/jenkins
找到修改端口号:
JENKINS_PORT="8080" 此端口不冲突可以不修改
vim /etc/sysconfig/jenkins
#监听端口
JENKINS_PORT="8080"
,jenkins是否正常启动
systemctl status jenkins
查看是否开启防火墙
systemctl status firewalld
systemctl stop firewalld.service #停止firewall