In this article, We are going to perform, How to install Jenkins on Ubuntu 18.04/16.04 LTS.
Jenkins is an opensource automation tool which is used for continuous integration. Some of below features of Jenkins
- Jenkins can be used as a simple CI server or turned into the continuous delivery hub for any project.
- Easy installation
- Easy configuration
- It provides 400+ Pulgin
- Jenkins provides extensible features by adding plugins and distributed by build different projects and testing etc.
- One Ubuntu server 18.04/16.04 LTS
- Atleast 1 GB RAM
- JDK 1.8 or Higher verison is supported
- Open Port 8080
Install JDK on Ubuntu
Please follow below article to download and install Oracle JAVA 8 on Ubuntu 18.04/16.04 LTS Manually.
$ sudo apt-get update
Step 1: Add Jenkins APT Repository Key
$ sudo wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
Add the Jenkins repository in system
$ echo deb https://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list
Step 2: Install Jenkins On Ubuntu
Once key and repository added , update the system
$ sudo apt-get update
Now its time to Install jenkins and its dependencies:
$ sudo apt-get install jenkins
Step 4: Start Jenkins Service
$ sudo systemctl start jenkins
$ sudo systemctl status jenkins
● jenkins.service - LSB: Start Jenkins at boot time Loaded: loaded (/etc/init.d/jenkins; bad; vendor preset: enabled) Active: active (exited) since Tue 2019-06-11 10:18:52 IST; 22h ago Docs: man:systemd-sysv-generator(8)
Step 5: Configure Jenkins
After installation of Jenkins ,successfully running Jenkins services and we will check on browser by Jenkins default port number 8080. We can browse server IP address or domain http://ip_address_or_domain_name:8080.
By hitting IP and Port on browser for the first time it will prompt for InitialAdminPassword. ssh server and type below command.
$ sudo cat /var/lib/jenkins/secrets/intialAdminPassword
After entering it will give some key as output. Copy and Paste in the browser and Click “Continue” . Next screen will appear as “Customize jenkins”.
In the above image we select “Install Suggested Plugins”, and its will prompt another screen to install “suggested plugin”.
When the Installation get successful it will prompt for another page “Create First Admin User”. On the below page enter username,password,Email.
In the above pic you can create new user and password or you can “Continue as admin“. After configuring everything you will prompt a new page.
Now click on “Start using Jenkins”. It will redirect to Jenkins Dashboard:
With the above step we have installed Jenkins Successfully.
In this article, We have covered, How to install Jenkins on Ubuntu 18.04/16.04 LTS.