教程
https://blog.csdn.net/rick_xk/article/details/129555543
最新war包下载地址
https://www.jenkins.io/zh/doc/book/installing/
http://mirrors.jenkins.io/war-stable/latest/jenkins.war
jdk-11.0.1 下载
wget https://repo.huaweicloud.com/openjdk/11.0.1/openjdk-11.0.1_linux-x64_bin.tar.gz tar -zxvf openjdk-11.0.1_linux-x64_bin.tar.gz
启动脚本
#/bin/bash
jar=jenkins.war
source /etc/profile
pid=`ps -ef|grep $jar|grep -v grep |grep -v grep|awk '{print $2}' `
echo $pid
echo "-------分割线-1--------"
for id in $pid
do
kill -9 $id
echo "killed $id"
done
echo "-------分割线-2--------"
sleep 1
nohup /home/openjdk11/jdk-11.0.1/bin/java -jar $PWD/$jar --httpPort=1180 >/dev/null 2>&1 &
echo "$jar restart success"
插件源
http://mirror.esuni.jp/jenkins/updates/update-center.json
更新/root/.jenkins/updates/default.json
将www.google.com替换为www.baidu.com
再全局替换 https://updates.jenkins.io/download/ -为 http://mirror.esuni.jp/jenkins/
重启
工作区更改 <workspaceDir>${JENKINS_HOME}/workspace/${ITEM_FULL_NAME}</workspaceDir>
标签:bin,grep,jar,11.0,echo,jenkins From: https://blog.51cto.com/u_15993308/6315023