jenkins版本升级

from:http://bbs.scmlife.com/forum.php?mod=viewthread&tid=31073&highlight=jenkins

工作中要安装一个插件但当前jenkins版本过低,在scmlife搜索了下没有jenkins升级相关资料,今天升级后特意做下记录分享给我大家,记录比较详细,高手就飘过吧 。为避免不必要的麻烦,以下请在Jenkins Home机器进行操作:

1.在jenkins系统设置界面发现类似如下提示:New version of Jenkins (1.519) is available fordownload (changelog).下载最新版本jenkins.war

2.[scm@Linux jenkins]$ ps -aux | grep jenkins    #查看jenkins安装路径,下方红色字体
jenkins  19139 30.8  7.0 1496412 273816 ?      Ssl  15:24  11:18 /usr/lib/jvm/jre-1.6.0/bin/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/share/jenkins/jenkins.war --logfile=/var/log/jenkins/jenkins.log --webroot=/var/cache/jenkins/war --daemon --httpPort=8888 --ajp13Port=8009 --debug=5 --handlerCountMax=100 --handlerCountMaxIdle=20


3.[scm@Linux jenkins]$cd /usr/share/jenkins/   #进入jenkins目录,建议此时备份原来的jenkins.war

4.[scm@Linux jenkins]$sudo service jenkins stop   #关闭jenkins服务

5.[scm@Linux jenkins]/sudo cp ~/jenkins.war ./   #将刚刚下载的jenkins.war文件copy到/usr/share/jenkins/

6.[scm@Linux jenkins]/sudo service jenkins start   #启动jenkins服务

7.好了,升级ok,可以看到版本已升级到最新到了1.519.

8.如果此时管理界面出现了一些提示:
Because of a security vulnerability discovered earlier, we need to change the encryption key used to protect secrets in your configuration files on the disk. This process scans a large portion of your$JENKINS_HOME (/var/lib/jenkins), find encrypted data, re-key them, which will take some time. Seethis document for more implications about different ways of doing this (or not doing this.) This operation can be safely run in background, but cautious users are recommended to take backups.
单击 “Re-key in background now”按钮即对整个Jenkins Home进行校验,一般需要1-2天的时间。可以在日志里查看进度。

你可能感兴趣的:(系统配置管理)