添加Jenkins的源(repository):
#sudo wget -O /etc/yum.repos.d/jenkins.repo http://jenkins-ci.org/redhat/jenkins.repo
#sudo rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key安装/检查JDK:#wget http://xxxxxxxxxx/jdk1.8.tgz
#cd /opt/app/ && mv jdk1.8.tgz /opt/app/ && tar zxvf jdk1.8.tgz #ln -sf /opt/app/jdk1.8.0_171 java #vim /etc/profile JAVA_HOME=/opt/app/java JRE_HOME=/opt/app/java/jre CLASS_PATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin export JAVA_HOME JRE_HOME CLASS_PATH PATH安装Jenkins:#sudo yum install jenkins
修配置文件:#vim /etc/sysconfig/jenkins
JENKINS_HOME="/opt/app/jenkins" JENKINS_USER="dev" JENKINS_PORT="8080"启动服务#systemctl start jenkins
6、访问服务器url:http://服务器IP:8080