Jenkins is the most widely used open-source automation server for building, testing, and deploying software. On Red Hat Enterprise Linux 8, setting up Jenkins provides a stable CI foundation backed by enterprise-grade OS support. This tutorial walks through installing Jenkins on RHEL 8 using the official package repository, configuring the firewall, and completing the initial setup wizard. By the end you will have a running Jenkins instance accessible from a browser.

Prerequisites

  • A RHEL 8 server with a non-root sudo user or root access
  • At least 2 GB RAM and 2 vCPUs recommended
  • Access to the internet or a local mirror for package downloads
  • firewalld running (default on RHEL 8)

Step 1 — Install Java 11

Jenkins requires Java. RHEL 8 ships OpenJDK 11 in its default repositories, making installation straightforward with dnf.

sudo dnf install -y java-11-openjdk
java -version

Confirm the output shows openjdk version "11" before continuing. If multiple Java versions exist you can set the default with alternatives --config java.

Step 2 — Add the Jenkins Repository

Jenkins is not in the default RHEL repos. Import the GPG key and create the repository file so dnf can locate the packages.

sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key

sudo tee /etc/yum.repos.d/jenkins.repo <<'EOF'
[jenkins]
name=Jenkins
baseurl=https://pkg.jenkins.io/redhat-stable
gpgcheck=1
gpgkey=https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key
enabled=1
EOF

sudo dnf makecache

The makecache command refreshes repository metadata so the new Jenkins repo is available immediately.

Step 3 — Install Jenkins

With the repository in place, install Jenkins and enable it to start automatically on boot.

sudo dnf install -y jenkins
sudo systemctl enable --now jenkins
sudo systemctl status jenkins

The status command should report active (running). If Jenkins fails to start, review the journal with journalctl -u jenkins -n 50.

Step 4 — Open the Firewall Port

Jenkins listens on port 8080 by default. Allow that port through firewalld and reload the rules.

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

You should see 8080/tcp in the listed ports. For production environments, consider placing Jenkins behind an Nginx or Apache reverse proxy on port 443 with TLS.

Step 5 — Retrieve the Initial Admin Password

On the first launch, Jenkins generates a one-time admin password stored on disk. You will need it to unlock the setup wizard in the browser.

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

Copy the 32-character alphanumeric string. Keep this value ready for the next step. After initial setup is complete this file can be deleted, though Jenkins will remove it automatically after the first login.

Step 6 — Complete the Setup Wizard and Install Suggested Plugins

Open your browser and navigate to http://<server-ip>:8080. Paste the initial admin password when prompted, then proceed through the wizard.

# On the Jenkins web UI:
# 1. Paste the initial admin password → Continue
# 2. Click "Install suggested plugins" and wait for downloads to complete
# 3. Create the first admin user (username, password, email)
# 4. Set the Jenkins URL — accept the default or enter your domain
# 5. Click "Start using Jenkins"

# Verify the Jenkins CLI is accessible
curl -s http://localhost:8080/api/json | python3 -m json.tool | head -20

The suggested plugin set includes Pipeline, Git, Credentials, and dozens of other commonly used integrations. You can install additional plugins later via Manage Jenkins → Plugins.

Conclusion

You have successfully installed Jenkins on RHEL 8, configured the firewall, and completed the initial setup wizard with the suggested plugin bundle. Jenkins is now ready to receive jobs and run automated builds. From this point you can connect source control repositories, configure build agents, and start defining your first pipelines. Regular updates via sudo dnf update jenkins keep the installation secure and current.

Next steps: How to Configure Jenkins Pipelines and Jenkinsfile on RHEL 8, How to Install GitLab CE on RHEL 8, and How to Set Up a Git Server with Gitea on RHEL 8.