Sunday, October 08, 2017

Jenkins Offline Install on Red Hat Enterprise Linux Server

In this post we will see how to do an offline install Jenkins and required plugins on a Red Hat Enterprise Linux Server release 7.3. This is likely the case when your server is behind a firewall. But you have access to internet from your workspace. The assumption here is that you have sudo access on the server to do the install. Follow these steps...
  1. Make sure you have Java 8 or higher installed on your server and that JAVA_HOME is set, as well as $JAVA_HOME/bin is in PATH
  2. Download the RPM key for jenkins from https://jenkins-ci.org/redhat/jenkins-ci.org.key.
  3. Import the key
    sudo rpm --import jenkins-ci.org.key
  4. Download the rpm package for the Jenkins version you want to install from http://pkg.jenkins.io/redhat-stable/.
  5. Install Jenkins using the following command
    sudo yum install jenkins-2.73.1-1.1.noarch.rpm
Jenkins Installation Folder on Red Hat Enterprise Linux Server release 7.3
Once you are done with the above steps, Jenkins will be installed in /var/lib/jenkins folder. You will also be able to see the jenkins.war file in /usr/lib/jenkins folder.
Start and Stop Jenkins manually
To start and stop Jenkins manually instead of using systemctl, you can use the following commands
sudo service jenkins start
sudo service jenkins stop
Setup Jenkins Plugins in Offline Mode
To install plugins in offline mode, you have download the .hpi plugin file from https://updates.jenkins-ci.org/download/plugins/. However, if you go this route, you will have to download the dependencies too, which can make this task near impossible. The easier way is to
  1. Install Jenkins and the related plugins on your workstation, or any other machine (It can be Windows machine too).
  2. Once all the plugins are downloaded, you can copy the plugins folder from the workstation to the Jenkins server /var/lib/jenkins folder.
  3. After you copy, just stop and start Jenkins, and you will see that all your plugins are installed.

2 comments:

Popular Posts