http://blog.csdn.net/clj198606061111/article/details/52259545
- 安装
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
yum install jenkins
- 修改端口
vi /etc/sysconfig/jenkins
JENKINS_PORT="8086"
- service jenkins start
报错Starting Jenkins bash: /usr/bin/java: No such file... - vi /etc/init.d/jenkins
修改jdk配置
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
"
修改为
candidates="
/etc/alternatives/java
/usr/local/jdk1.8.0_65/bin/java
/usr/local/jdk1.8.0_65/jre/bin/java
"
- 重新启动
service jenkins restart
systemctl daemon-reload
systemctl status jenkins.service
- 初始密码
vi /var/lib/jenkins/secrets/initialAdminPassword
把密码复制进去,continue
网友评论