• 1.安装java

    yum install -y java
  • 2.安装git

    yum install -y git
  • 3.引入jenkins源到yum并安装

    sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
    sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
    yum install jenkins
  • 4.修改配置并启动

    vim /etc/sysconfig/jenkins

    修改项

    JENKINS_USER="root"
    JENKINS_PORT="8888"

    启动

    service jenkins start

    访问

    http://www.xxx.com:8888/
  • 5.常见问题
    如果界面提示Jenkins正在启动,请稍后…或者提示
    Please wait while Jenkins is getting ready to work…

    vim /var/lib/jenkins/hudson.model.UpdateCenter.xml

    替换url变成

    <?xml version='1.1' encoding='UTF-8'?>
    <sites>
    <site>
      <id>default</id>
      <url>https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json</url>
    </site>
    </sites>

    重启jenkins服务


IT小马
1.2k 声望166 粉丝

Php - Go - Vue - 云原生