How to deploy Jenkins on Ubuntu 20.04 LTS ?




Build, Deploy & Automate anything using Jenkins. Its an opensource automation tool and have hundreds of plugins to support the continuous integration and continuous delivery.


To install Jenkins in Ubuntu 20.04 LTS, following steps will be helpful:

a) Add the key and the jenkins repo on the ubuntu 20.04 LTS Server and update the repo list:

     # wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
     # echo "deb https://pkg.jenkins.io/debian-stable binary/" >> /etc/apt/sources.list
     # apt-get update

b) Install openjdk latest version:

      # apt install openjdk-11-jre-headless
      # java -version

c) Install the jenkins and enable it across reboot:

      # apt-get install jenkins -y
      # systemctl enable jenkins
      # systemctl status jenkins

d) If you will check, port 8080 is open for jenkins by java:

      # netstat -ntpl | egrep 'State|8080'
         Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
         tcp6       0           0          :::8080                            :::*                       LISTEN      20233/java

e) Now you can use system ip and port 8080 to access the Jenkins URL and follow the steps as recommended to install the plugins.

       URL:  http://<server-ip>:8080

f) Its possible to change the default 8080 port to some other port as required for security reason. 
   To change the port from 8080 to 9443, open the '/etc/default/jenkins' file and replace the port 8080 by 9443:

    Post change it should look like below:

      # egrep ^HTTP_PORT /etc/default/jenkins
          HTTP_PORT=9443       

g) Now you can use system ip and port 9443 to access the Jenkins URL:

       URL:  http://<server-ip>:9443

h) To get the 'admin' user's password use the below command after login to the system using root user:

    # cat /var/lib/jenkins/secrets/initialAdminPassword

Comments

Popular posts from this blog

VNC Configuration using Ansible in CentOS 7

How to build Ubuntu Server 20.04 LTS OVA with vAPP Properties ?

LVM Configuration using Ansible in CentOS 7