jenkins rpm安装报错:
Starting Jenkins bash: /usr/bin/java: 没有那个文件或目录
sudo vim /etc/init.d/jenkins
candidates="
/usr/local/jdk1.8/bin/java 加入安装好的jdk的路径
/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/lib/jvm/java-11.0/bin/java
/usr/lib/jvm/jre-11.0/bin/java
/usr/lib/jvm/java-11-openjdk-amd64
/usr/bin/java
"
sudo systemctl daemon-reload
sudo systemctl start jenkins
重启就OK了