准备java 8环境
解压jdk包
tar xvf jdk-8u212-linux-x64.tar.gz
设置环境变量
vim /etc/profile
export JAVA_HOME=/usr/local/jdk1.8.0_212/
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib:$CLASSPATH
export JAVA_PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin
export PATH=$PATH:${JAVA_PATH}
source /etc/profile
java -version
下载rpm包
wget https://pkg.jenkins.io/redhat-stable/jenkins-2.164.3-1.1.noarch.rpm
安装
rpm -hiv jenkins-2.164.3-1.1.noarch.rpm
创建软链接
ln -sv /usr/local/jdk1.8.0_212/bin/java /usr/bin/
启动服务
systemctl start jenkins