安装Jenkins

// 获取repo

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

// 安装repo

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

// 安装Jenkins

yum install jenkins

// 修改Jenkins port

vim /etc/sysconfig/jenkins

// 修改JENKINS_PORT,默认是8080

JENKINS_PORT=8088

// 防火墙开端口

firewall-cmd --zone=public --add-port=8088/tcp --permanent
firewall-cmd --reload

// 修改JDK path
vim /etc/rc.d/init.d/jenkins
// candidates项

candidates="
/etc/alternatives/java
/usr/lib/jvm/java-1.8.0/bin/java
/usr/lib/jvm/jre-1.8.0/bin/java
/usr/lib/jvm/java-1.7.0/bin/java
/usr/lib/jvm/jre-1.7.0/bin/java
/usr/bin/java
"
    原文作者:一课一练
    原文地址: https://www.jianshu.com/p/7d203b52d99d
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞