In this tutorial, we will show you how to install Jenkins on Ubuntu 20.04 LTS. For those of you who didn’t know, Jenkins is an open-source automation server that is used to automate software development. Jenkins will automate the parts of software development related to building, testing, and deploying, facilitating continuous integration and continuous delivery. By using Jenkins the developers will know the status of his application. Failures, new features, and processes will be automated and monitored.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Jenkins on a 20.04 LTS (Focal Fossa) server.
Install Jenkins on Ubuntu 20.04 LTS Focal Fossa
Step 1. First, make sure that all your system packages are up-to-date by running these following
apt commands in the terminal.
Jenkins is made in Java, So to install Java just run the following command:
Verify the Java version by running the following command:
Now you have to add the Jenkins repository. But first, add the GPG key to secure the repository:
wget-q-O-https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
Next, add the Jenkins repository to the system:
sudosh-c'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
After that the Jenkins repository is enabled, update the apt package list and install the latest version of Jenkins:
Once we have done with the installation, we have to enable and start Jenkins service with the following commands:
Enabled Jenkins server allows the 8080 port for incoming traffic:
Jenkins will be available on HTTP port 8080 by default. Open your favourite browser and navigate to http://yourdomain.com:8080 or http://server-ip:8080 and complete the required steps to finish the installation.
Default installation password can be found at /var/lib/jenkins/secrets/initialAdminPassword as showing in below image.
Congratulations! You have successfully installed Jenkins. Thanks for using this tutorial for installing Jenkins on Ubuntu 20.04 LTS Focal Fossa system. For additional help or useful information, we recommend you to check the official Jenkins website.