- Nikhil Bhaskar
- July 11, 2021
How to Setup Jenkins On Ubuntu 20.04 LTS
Jenkins is an free & open source continuous integration/continuous delivery and deployment (CI/CD) automation software written in the Java programming language. It is used to implement CI/CD workflows, called pipelines.
It provides continuous integration and continuous delivery in software projects by automating parts related to build, test, and deployment.
Install Jenkins on Ubuntu.
Update the System.
apt-get update
Install Java.
apt install default-jre
Check Java version.
java -version
Add the repository key.
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
Add package repository address to the server’s sources.list.
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
Update the System.
apt-get update
Install Jenkins.
apt-get install jenkins
Start Jenkins Service.
systemctl start jenkins
Here is the command output.
● jenkins.service - LSB: Start Jenkins at boot time
Loaded: loaded (/etc/init.d/jenkins; generated)
Active: active (exited); 4s ago
Docs: man:systemd-sysv-generator(8)
Process: 5415 ExecStart=/etc/init.d/jenkins start (code=exited, status=0/SUCCESS)
Allow port Number 8080 on ufw firewall.
ufw allow 8080
Allow Openssh & Enable ufw.
ufw allow OpenSSH
&
ufw enable
Press y.
Check ufw status.
ufw status
Here is the command output.
Status: active
To Action From
-- ------ ----
8080 ALLOW Anywhere
OpenSSH ALLOW Anywhere
8080 (v6) ALLOW Anywhere (v6)
OpenSSH (v6) ALLOW Anywhere (v6)
Access Jenkins.
Test the Jenkins.
http://server_ip:8080
To get the initial password from /var/lib/jenkins/secrets/initialAdminPassword.Pass the administrator password & Click on Continue.
There are Two option to install jenkins plugins: suggested or select the plugins.
Click on Select Plugins option and select plugins as per the requirement & Click on Install.
Click on Install suggested Plugins which will immediately begin the installation process.
Provide the Jenkins User credentials & Click on Save & Continue.
Check Jenkins URL & Click on Save & Continue.
Now Jenkins is ready to use, Click on Start using Jenkins.
Now we can configure Jenkins as per requirement.