Logo

How to Install and configure Jenkins on Ubuntu 24.04

Mar 20, 2024

To install Jenkins on Ubuntu 24.04, follow the steps below.

Step 1 : Update your package index:

sudo apt update

Step 2 : Install OpenJDK:

sudo apt install default-jdk

Step 3 : Add the Jenkins repository key:

sudo wget -O /usr/share/keyrings/jenkins-keyring.asc https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key

Step 4 : Add the Jenkins repository:

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

Step 5 : Update your package index again:

sudo apt update

Step 6 : Install Jenkins:

sudo apt install -y jenkins

Step 7 : Start Jenkins service:

sudo systemctl start jenkins

Step 8 : Enable Jenkins to start on boot:

sudo systemctl enable jenkins

Step 9 : Retrieve the initial admin password:

sudo cat /var/lib/jenkins/secrets/initialAdminPassword

Step 10 : Access Jenkins using your web browser:

http://your_server_ip_or_domain:8080

- Log in using the initial admin password obtained in Step 9.

- Install suggested plugins.

- Wait for the plugin installation to complete.

- Create a user for Jenkins.

- Configure the Jenkins URL if necessary.

- Jenkins is ready! Click "Start using Jenkins".

Congratulations! You have successfully installed and configured Jenkins on Ubuntu 24.04.

Recommended