Hot Ice

记录精彩的程序人生

Anything is possible!
  menu
41 文章
0 浏览
0 当前访客
ღゝ◡╹)ノ❤️

centos软件安装-jenkins

安装

下载 wget https://pkg.jenkins.io/redhat-stable/jenkins-2.190.2-1.1.noarch.rpm

安装 rpm -ivh jenkins-2.190.2-1.1.noarch.rpm

修改端口号 vim /etc/sysconfig/jenkins

JENKINS_PORT="8900"

设置jenkins以root运行

JENKINS_USER="root"

vim /etc/rc.d/init.d/jenkins 里面的 candidates的下面第一行

新增java路径/home/soft/jdk1.8.0_231/bin/java

然后 systemctl daemon-reload

启动 systemctl start jenkins

将插件文件hpi上传到 /var/lib/jenkins/plugins 后重启即可 systemctl restart jenkins

shell中头部加 #!/bin/bash -ilex 可使shell使用系统环境变量

加 BUILD_ID=dontKillMe防止shell执行完杀掉进程

修改workspace目录位置

mkdir -p /home/soft/jenkins/workspace

vim /var/lib/jenkins/config.xml

${JENKINS_HOME}/workspace/${ITEM_FULL_NAME}

换成

/home/soft/jenkins/workspace/${ITEM_FULL_NAME}

systemctl restart jenkins


标题:centos软件安装-jenkins
作者:炎无道
地址:https://justxy.xyz/articles/2020/11/05/1604564910838.html