Step #1. Prepare the server with the required software (Jenkins installation prerequisites)

  • Linux webserver
  • Download your preferred Jenkins.war version
  • Download JDK from Oracle website

Prepare a download location (this is optional, you may download to the home directory itself)

$ mkdir -p ~/download && cd ~/download

Download Jenkins.war, I am using version 2.150.3

$ wget http://mirrors.jenkins.io/war-stable/2.150.3/jenkins.war

Download Java - JDK from Oracle (this would require you to log in to Oracle.com (free account)

$ wget download.oracle.com/otn/java/jdk/8u221-b11/XXXXXXXXXXXX/jdk-8u221-linux-x64.tar.gz

Step #2. Prepare the Jenkins RUN location

My example, I am using a directory "jenkins" in user home directory

$ mkdir -p jenkins/home
$ cp ~/downloads/jenkins.war ~/jenkins/
$ tar -zxvf ~/downloads/jdk-8u221-linux-x64.tar.gz -C ~/jenkins/

Step #3. Start Jenkins in port 8080

Start Jenkins using our own JDK/Java. Also, set preferred JENKINS_HOME (default Jenkins home will be ~/.jenkins)

$ export JENKINS_HOME=~/jenkins/home/
$ nohup ~/jenkins/jdk1.8.0_221/bin/java -jar ~/jenkins/jenkins.war &


[developer@aws-askdevops jenkins]$ export JENKINS_HOME=~/jenkins/home/ 
[developer@aws-askdevops jenkins]$ nohup ~/jenkins/jdk1.8.0_221/bin/java -jar ~/jenkins/jenkins.war &
[1] 7360
[developer@aws-askdevops jenkins]$ nohup: ignoring input and appending output to ‘nohup.out’

[developer@aws-askdevops jenkins]$

Step #4. Verify Jenkins is up and running

$ ps -ef | grep jenkins

This would list lines with the java process which initiated jenkins.jar, as shown below.

$ ps -ef | grep jenkins
developer   22505     1  0 Jan01 ?        00:07:11 /home/developer/jenkins/jdk1.8.0_221/bin/java -jar /home/developer/jenkins/jenkins.war

To access it through browser,
http://localhost:8080/ or the IP address of the server, for example

Sep 19, 2018 by | 33 views
DevOpsRun.com is LIVE!

Articles for DevOps Geeks
MobaXterm Customization
CHMOD Explained!
Bash history powerful tips
Ubuntu bash from Windows