jenkins的安装与配置

perfect start 5月前 ⋅ 489 阅读

安装

  1. 下载Jenkins 下载地址

  2. rpm -ivh 下载的rpm包

    rpm -ivh jenkins-2.204.6-1.1.noarch.rpm
    
    
  3. 下载jdk(jdk1.8)

        tar -zxvf jdk-8u221-linux-x64.tar.gz
        mv jdk1.8.0_221 /usr/local/jdk
        # 配置环境变量
        vim /etc/profile
        #增加以下配置
        export JAVA_HOME=/usr/local/jdk
        export JRE_HOME=/usr/local/jdk/jre
        export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
        export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
        vim /etc/init.d/jenkins
        # 增加java命令所在路径
        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/lib/jvm/java-11.0/bin/java
        /usr/lib/jvm/jre-11.0/bin/java
        /usr/lib/jvm/java-11-openjdk-amd64
        /usr/bin/java
        # 新增的配置
        /usr/local/jdk/bin/java
        "
        #启动Jenkins
        /etc/init.d/jenkins start
    
  4. 访问ip:8080,根据提示操作


全部评论: 0

    我有话说: