1.安装Jenkins-Stable源
curl http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo --output /etc/yum.repos.d/jenkins.reporpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.keyyum clean all
2.安装Jenkins-Stable
yum install jenkins
3.设置防火墙
# 按端口:打开TCP的8080端口firewall-cmd --zone=public --add-port=8080/tcp --permanent# 按服务:打开HTTP的默认端口firewall-cmd --zone=public --add-service=http --permanent# 重新加载防火墙firewall-cmd --reload启动Jenkins服务# 启动Jenkinsservice jenkins start# 停止Jenkinsservice jenkins stop# 重新启动Jenkinsservice jenkins restart# 开机自动启动Jenkinschkconfig jenkins on
4.安装插件
访问Jenkins的Homepage=>在firefox中打开http://localhost:8080在[Homepage]:点击[Manage Jenkins]->[Manage Plugins]=>进入[Plugin Manager]在[Plugin Manager]:切换到[Available]页查找并安装[GIT plugin]查找并安装[Environment Injector Plugin]查找并安装[Lockable Resources plugin]查找并安装[Python Plugin]