How to install Jenkins on Rocky Linux 9 / Alma Linux 9

Hello, friends. In this post, we will talk about a vital tool in continuous integration. Today, you will learn how to install Jenkins on Rocky Linux 9 / Alma Linux 9.

Jenkins is an open-source server for continuous integration. It is a tool used to compile and test software projects continuously. This has the advantage that developers can quickly integrate their changes into the software on the application server.

Some details about Jenkins include that it is open source and built in Java. With this in mind, it is deducible that it is cross-platform and that you can use it in many environments.

Let’s get started.

Installing Jenkins on Rocky Linux 9 / Alma Linux 9

Preparing the server for Jenkins

First, access via SSH to the server and then update it

sudo dnf update

The next step is to install some DNF utilities.

sudo dnf install dnf-utils

Then enable the EPEL repository

sudo dnf install epel-release

Next, install Java from the official repositories.

sudo dnf install java-11-openjdk java-11-openjdk-devel

Confirm the Java version by running

java -version

Sample Output:

openjdk version "" 2022-08-12 LTS
OpenJDK Runtime Environment (Red_Hat- (build
OpenJDK 64-Bit Server VM (Red_Hat- (build, mixed mode, sharing)

Add Jenkins repository

An interesting way to install Jenkins is to do it via the repositories they provide for Rocky Linux 9 / Alma Linux 9

Add the repository

sudo wget -O /etc/yum.repos.d/jenkins.repo

Then the GPG key of it

sudo rpm --import

Installing Jenkins on Rocky Linux 9 / Alma Linux 9

With the repository added, you can now install Jenkins

sudo dnf install jenkins
Install Jenkins on Rocky Linux 9 / Alma Linux 9
Install Jenkins on Rocky Linux 9 / Alma Linux 9

When the installation is finished, you can start it and enable it to start with the system

sudo systemctl enable --now jenkins

Then, check the status of the service

sudo systemctl status jenkins
Jenkins Status
Jenkins Status

Don’t forget to set the rules in the firewall properly so that Jenkins is accessible.

sudo firewall-cmd --add-port=8080/tcp --zone=public --permanent
sudo firewall-cmd --reload

Yes, Jenkins works via port 8080

Completing the Jenkins installation

Now open your favorite web browser and go to http://your-server:8080 to complete the installation. You will initially see this page.

Installing Jenkins
Installing Jenkins

You will be prompted for a secure password, which you can obtain by running

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

In my case, it has generated this password


Copy and paste it, and you will be able to continue.

Then, you will be prompted to choose to install the suggested plugins or select the ones you want.

Customize Jenkins
Customize Jenkins

The rest of the steps are to install the plugins, create a new user with your password and verify the Jenkins URL. Finally, you will see the dashboard.


In this post, you learned how to install Jenkins on Rocky Linux 9 / Alma Linux 9 using the official developer repositories.

I am Angelo. A systems engineer passionate about Linux and all open-source software. Although here I'm just another member of the family.


Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook