-----------------------------------------------------------------html
原创博文,未经做者容许禁止转载。java
博主:疲惫的豆豆ubuntu
连接:http://www.cnblogs.com/dzblog/p/6962000.htmlthis
----------------------------------------------------------------spa
更新:rest
2017-06-19:因我的须要替换成最新的weekly版本,确保操做步骤没问题。code
接手一个前人维护的Jenkins系统,使用的是ver2.9的版本,也就是weekly的版本,比较老旧,并且担忧哪天会不支持,决定替换成LTS版本,以绝后患。orm
其实升级方式有不少,由于不知道前人是如何安装的,采起最稳妥的替换war包的方式升级。htm
通常状况下,war的安装路径在/usr/share/jenkins目录下。blog
不过也有部分人不喜欢安装在这里,能够经过系统管理(System management)--> 系统信息(System Info)查找.war的文件,以下图:
先列出官网地址:https://jenkins.io/download/,可能会有GFW的缘由致使被屏蔽。
咱们可使用以下几个连接去下载:
好比说我升级的是最新的LTS版本:2.46.3,路径:Index of /jenkins/war-stable-rc/2.46.3/
地址:https://mirrors.tuna.tsinghua.edu.cn/jenkins/war-stable-rc/2.46.3/jenkins.war
ubuntu系统可使用wget下载
wget https://mirrors.tuna.tsinghua.edu.cn/jenkins/war-stable-rc/2.46.3/jenkins.war
1. 中止Jenkins服务(记得备份原来的jenkins.war,以防万一)
http://jenkinsIP:port/exit
2. 替换最新的war包,并启动jenkins(通常也就java -jar jenkins.war便可)
参考:
https://stackoverflow.com/questions/11062335/update-jenkins-from-a-war-file的这句话:
You can overwrite the existing jenkins.war file with the new one and then restart Jenkins.
This file is usually located in /usr/share/jenkins.
If this is not the case for your system, in Manage Jenkins -> System Information, it will display the path to the .war file under executable-war.
END