What is the solution to upgrade a jenkins instance

I initially installed the jenkins version 2.176.3 by downloaded the RPM package and used “yum install jenkins.2.176.3.rpm.package” to install it in a Centos 7.x server.

And after the initially installation, I upgraded the jenkins instance by replace the jenkins.war package in /usr/lib/jenkins several times, and now the version of the running jenkins instance is 2.303.3,

Currently, I want to upgrade the 2.303.3 version to a higher version, but when I use the previous method (replace a war package), the jenkins can’t start up.

If I want to upgrade it. what’s the best solution to do it? Can I try to download the lastest rpm package and use “yum update latest.rpm.package” to do the upgrade? Or any other better methods?

1 Like

better than yum upgrade? using system package managers is the recommended solution.

I agree with @halkeye . Use the system package manager (yum, dnf, zypper, apt, etc.) to perform the upgrade.

I also recommend reading the upgrade guide. It describes the changes in the release and helps you prepare for the upgrade. The Jenkins 2.332.1 upgrade notes that the Linux installation switched from System V init to systemd.

Thanks halkeye and MarkEWaite for your help.
I have one more question is: I use war package replacement from version 2.176.3 to the current version 2.303.3. If I upgrade the current version 2.303.3 to the latest version by yum, I mean, they are two diffirent method, does it impact or affect the upgrade to the latest by yum? May the previous replacement cause the yum upgrade fail?
Thanks in advance for your answer.

I don’t know how yum handles unexpected changes to files that it includes in the package.

Modifying a binary file provided by a Linux package manager outside the package manager is not a common technique. I suspect the package manager will ignore the changes and update the jenkins.war file, but I have not tried it.