How to Install and Configure Jenkins on Rocky Linux 9

To install Jenkins on Rocky Linux 9, follow the steps below:

Step 1 : Ensure your system is up-to-date by running the following command:

sudo dnf update

Step 2 : Install OpenJDK, which is required to run Jenkins:

sudo dnf install java-17-openjdk

Step 3 : Add the Jenkins repository key to verify package integrity:

sudo rpm --import

Step 4 : Add the Jenkins repository to your system:

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

Step 5 : Install Jenkins using the following command:

sudo dnf install jenkins

Step 6 : Start the Jenkins service:

sudo systemctl start jenkins

Step 7 : Enable Jenkins to start on boot:

sudo systemctl enable jenkins

Step 8 : Check the status of the Jenkins service:

sudo systemctl status jenkins

Step 9 : If you are using firewall-cmd, open the Jenkins port:

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

Step 10 : Retrieve the initial admin password for Jenkins:

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

Step 11 : Access Jenkins

Access Jenkins using your web browser at http://your_ip:8080 or replace your_ip with your server's IP address.

Login using the initial admin password obtained in Step 10.

Install the suggested plugins to enhance Jenkins functionality.

Create a user account for Jenkins.

Configure the Jenkins URL in the Jenkins settings.

Click "Start using Jenkins" to complete the setup.

Congratulations! You have successfully installed and configured Jenkins on Rocky Linux 9.