How to install Jenkins on Ubuntu 22.04

In this article, we will see how to install Jenkins on Ubuntu 22.04 step by step.

Prerequistes to install Jenkins on Ubuntu:

Jenkins installers are available for several Linux distributions.

Debian/Ubuntu Fedora Red Hat / CentOS

OpenJDK JDK / JRE 11/17 – 64 bits. Go through below link to install Java on Ubuntu
Minimum hardware requirements:
256 MB of RAM
1 GB of drive space (although 10 GB is a recommended minimum if running Jenkins as a Docker container)

Recommended hardware configuration for a small team:
4 GB+ of RAM
50 GB+ of drive space

Install Jenkins on Ubuntu 22.04

1. Go to Jenikins Download Page

2. Click on Ubuntu/Debian left side under LTS(stable) as shown below.

How to install Jenkins on Ubuntu 22.04

3. Now run the commands one by one.

4. First add the key to our system:

curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo tee \ /usr/share/keyrings/jenkins-keyring.asc > /dev/null

5. Then add a Jenkins apt repository entry:

echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \ https://pkg.jenkins.io/debian-stable binary/ | sudo tee \ /etc/apt/sources.list.d/jenkins.list > /dev/null

6. Update our local package index:

sudo apt-get update

7. Now install Jenkins on Ubuntu using the below command.

sudo apt-get install jenkins

8. After installation, start the Jenkins using below command.

sudo systemctl start jenkins

9. Verify whether Jenkins started or not by running the below command.

sudo systemctl status jenkins

Jenkins Post Installation setup on Ubuntu 22.04

1. Open any browser and type http://localhost:8080/

2. Now, open/cat the file as highlighted below to get the password for Administrator.

3. Copy the password from the file(Password is not same for you and me) and paste in the Administrator password. Then click on Continue.

4. Now click on Install suggested plugins.

5. After plugins installation completes, we have to create the first admin user. Enter the username password email and full name. Then click on save and continue.

6. In instance configuration, keep url as it is or you can provide the domain if you have already. I am going with default one. Then click on Save and Finish.

So in this article, we have seen how to install prerequisites to install Jenkins and then we have seen how to download and install Jenkins on Ubuntu 22.04 step by step.

For the above process, please watch below video:

Leave a Reply

Your email address will not be published. Required fields are marked *