美文网首页
CentOS安装jenkins

CentOS安装jenkins

作者: 回声2016 | 来源:发表于2017-03-13 13:33 被阅读0次

    http://blog.csdn.net/clj198606061111/article/details/52259545

    1. 安装
    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
    
    1. 修改端口
      vi /etc/sysconfig/jenkins
    JENKINS_PORT="8086"
    
    1. service jenkins start
      报错Starting Jenkins bash: /usr/bin/java: No such file...
    2. 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
    "
    
    1. 重新启动
    service jenkins restart
    systemctl daemon-reload
    systemctl status jenkins.service
    
    1. 初始密码
    vi /var/lib/jenkins/secrets/initialAdminPassword
    

    把密码复制进去,continue


    1. 访问
      http://ip:8086

    相关文章

      网友评论

          本文标题:CentOS安装jenkins

          本文链接:https://www.haomeiwen.com/subject/ivcfnttx.html