安装java11
    sudo yum install epel-release java-11-openjdk-devel java-11-openjdk
    如果8080已占用,修改端口
    vi /usr/lib/firewalld/services/jenkins.xml
    vi /etc/sysconfig/jenkins
    JENKINS_PORT=”18080”
    vi /usr/lib/systemd/system/jenkins.service
    Environment="JENKINS_PORT=18080"
    进入/etc/rc.d/init.d/jenkins文件,把java的环境变量添加进去
    /usr/lib/jvm/java-11-openjdk-11.0.13.0.8-4.el8_5.x86_64/bin/java

    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
    sudo yum install jenkins
    sudo systemctl daemon-reload
    sudo systemctl start jenkins

    标签: none

    添加新评论