How to install a particular version of CloudBees Jenkins Platform with YUM

Issue

I don’t want to install the latest version. How do I install a particular version of CloudBees Jenkins Platform using YUM?

Environment

Resolution

As the Jenkins YUM package doesn’t require any package dependencies, the easiest solution would be to download the RPM onto the server and install it manually.

You can find all the RPM’s at:

The command is rpm -ivh /path/to/rpm. Where /path/to/rpm is replaced with the actual location of the downloaded RPM.

Install

CentOS 7 / RHEL 7:

For example, to manually install 2.164.3.2:

(run as root or use sudo)
yum install java-1.8.0-openjdk # can be omitted if Java 8 is already installed
wget -c https://downloads.cloudbees.com/cje/rolling/rpm/RPMS/noarch/jenkins-2.164.3.2-1.1.noarch.rpm
rpm -ivh jenkins-2.164.3.2-1.1.noarch.rpm
systemctl enable jenkins
systemctl start jenkins

To manually install CJOC 2.150.2.3:

# (run as root or use sudo)
yum install java-1.8.0-openjdk # can be omitted if Java 8 is already installed
wget -c https://downloads.cloudbees.com/cjoc/rolling/rpm/RPMS/noarch/jenkins-oc-2.150.2.3-1.1.noarch.rpm
rpm -ivh jenkins-oc-2.150.2.3-1.1.noarch.rpm
systemctl enable jenkins-oc
systemctl start jenkins-oc

CentOS 6 / RHEL 6:

For example, to manually install 2.164.3.2:

(run as root or use sudo)
yum install java-1.8.0-openjdk # can be omitted if Java 8 is already installed
wget -c https://downloads.cloudbees.com/cje/rolling/rpm/RPMS/noarch/jenkins-2.164.3.2-1.1.noarch.rpm
rpm -ivh jenkins-2.164.3.2-1.1.noarch.rpm
/sbin/chkconfig --add jenkins
service jenkins start

To manually install CJOC 2.150.2.3:

# (run as root or use sudo)
yum install java-1.8.0-openjdk # can be omitted if Java 8 is already installed
wget -c https://downloads.cloudbees.com/cjoc/rolling/rpm/RPMS/noarch/jenkins-oc-2.150.2.3-1.1.noarch.rpm
rpm -ivh jenkins-oc-2.150.2.3-1.1.noarch.rpm
/sbin/chkconfig --add jenkins-oc
service jenkins-oc start

Upgrade

In the case where CloudBees Jenkins Platform is already installed via YUM, and you would like to upgrade to a specific version, then just replace rpm -ivh with rpm -Uvh.

You can also refer to https://access.redhat.com/solutions/1189 if you need help installing or upgrading the RPM.

Have more questions?

2 Comments

  • 0
    Avatar
    Vigneshwaran Kannan

    i have installed the JOC and Jenkins Master in /app/jenkins using command "yum --installroot=/app/jenkins install jenkins". Now i'm planning to do an upgrade JOC and jenkins masters to newer version. So when i try to execute "yum upgrade jenkins" command it gets failed with below message but in this server only jenkins is running now. Any suggestion on how to do an upgrade?

    # yum upgrade jenkins
    Updating Subscription Management repositories.
    Last metadata expiration check: 0:54:22 ago on Sat 21 Nov 2020 02:23:39 AM EST.
    Package jenkins available, but not installed.
    No match for argument: jenkins
    Error: No packages marked for upgrade.

    Edited by Vigneshwaran Kannan
  • 0
    Avatar
    Denys Digtiar

    Hi Vigneshwaran,

    You said that you modified the `installroot` when installing the package. But you upgrade command does not show the usage of installroot, hence, I am guessing, is the error that you see.

    Based on my reading of the man page, you need to provide `--installroot=/app/jenkins` and `--releasever=/` to the `yum upgrade` command. I have not tested this so not 100% certain. The Red Hat forums might give you better explanation of what is going on.

Please sign in to leave a comment.