如果无法发送通知提示javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate 需要修改$JRE/lib/security/java.security
更换方法很简单。进入服务器,将 /var/lib/jenkins/updates/default.json 内的插件源地址替换成清华大学的源地址,将 google 替换为 baidu 即可。
1
sed -i 's/http:\/\/updates.jenkins-ci.org\/download/https:\/\/mirrors.tuna.tsinghua.edu.cn\/jenkins/g' /var/lib/jenkins/updates/default.json && sed -i 's/http:\/\/www.google.com/https:\/\/www.baidu.com/g' /var/lib/jenkins/updates/default.json
修改运行端口
1 2 3
vim /etc/sysconfig/jenkins
JENKINS_PORT="8080" //改成 JENKINS_PORT="8088"
基础命令
启动、重启、关闭
1 2 3
[root@localhost jenkins]# service jenkins start [root@localhost jenkins]# service jenkins restart [root@localhost jenkins]# service jenkins shutdown
错误提示
1
Starting jenkins (via systemctl): Warning: jenkins.service changed on disk. Run 'systemctl daemon-reload' to reload units.
若出现上述问题,执行。
1
[root@localhost jenkins]# systemctl daemon-reload
启动jenkins
1
[root@localhost jenkins]# sudo service jenkins start