安装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
"

你可能感兴趣的:(安装Jenkins)