安装jenkins

1.添加Jenkins的源(repository)
wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
2.安装Jenkins
yum install jenkins
3.Jenkins安装完成之后,有如下目录:
/usr/lib/jenkins/:jenkins安装目录,WAR包会放在这里。
/etc/sysconfig/jenkins:jenkins配置文件,“端口”,“JENKINS_HOME”等都可以在这里配置。
/var/lib/jenkins/:默认的JENKINS_HOME。
/var/log/jenkins/jenkins.log:Jenkins日志文件。
4.启动Jenkins
service jenkins start 或者 systemctl start jenkins.service

启动中可能的错误:/usr/bin/java: No such file or directory

修改/etc/init.d/jenkins

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/java/jdk1.8.0_152/bin/java



参考博客:https://my.oschina.net/aibinxiao/blog/1576678/

posted on 2021-01-17 15:26  渐行渐远的那些人  阅读(59)  评论(0编辑  收藏  举报