1.去官网上下载war包
2、进入jenkins登录机器,找到jenkins.war
find / -name jenkins.war
linux在 /usr/share/java/jenkins.war
win在 D:\Program Files (x86)\Jenkins
3、拷贝一份jenkins.war作为备份
4、关闭jenkins服务,并查看jenkins状态
systemctl stop jenkins
systemctl status jenkins
5、将最新的jenkins.war移动到当前目录中
6、再次启动jenkins()
如果启动报错,说java版本过低,需如下解决
linux
修改 /lib/systemd/system/jenkins.service
win
修改 D:\Program Files (x86)\Jenkins\jenkins.xml