在 CentOS 上重启 Jenkins,常见有以下几种方式,取决于你的安装方式(systemd 还是 service):
sudo systemctl restart jenkins
sudo systemctl status jenkins
sudo systemctl start jenkins
sudo systemctl stop jenkins
sudo service jenkins restart
如果是 WAR 包方式运行:
# 找到 Jenkins 进程
ps -ef | grep jenkins
# 杀掉进程
kill -9 <pid>
# 重新启动
java -jar jenkins.war
netstat -lntp | grep 8080
sudo systemctl stop jenkins
sudo systemctl start jenkins
sudo systemctl enable jenkins
如果你能告诉我:
我可以给你更精确的操作命令。