Jenkins is the most widely adopted open-source CI/CD automation server, used to build, test, and deploy software across thousands of organisations. It provides a large plugin ecosystem (1,800+ plugins) for integrating with virtually every version control system, build tool, test framework, and deployment target. Jenkins on RHEL 9 is typically deployed as a system service and accessed via a web interface where developers can configure pipelines, monitor builds, and view test results. This guide covers installing Jenkins LTS (Long-Term Support) on RHEL 9 from the official Jenkins repository, configuring the initial setup, managing Jenkins as a systemd service, and opening the firewall for web access.

Prerequisites

  • RHEL 9 with at least 2 GB RAM and 10 GB disk space
  • Java 17 or 21 (Jenkins 2.426+ requires Java 17+)

Step 1 — Install Java

# Install OpenJDK 21 (recommended for Jenkins LTS)
dnf install -y java-21-openjdk

java --version

Step 2 — Add the Jenkins Repository and Install

# Add the official Jenkins LTS repository
wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key

# Install Jenkins
dnf install -y jenkins

# Enable and start the Jenkins service
systemctl enable --now jenkins
systemctl status jenkins

Step 3 — Configure the Firewall

# Open Jenkins port (default: 8080)
firewall-cmd --permanent --add-port=8080/tcp
firewall-cmd --reload

# Access Jenkins at: http://your-server-ip:8080

Step 4 — Complete the Initial Setup

# Get the initial admin password
cat /var/lib/jenkins/secrets/initialAdminPassword

# In the browser:
# 1. Paste the initial admin password
# 2. Select "Install suggested plugins" (recommended for beginners)
# 3. Create the first admin user
# 4. Set the Jenkins URL (e.g., http://your-server-ip:8080)

# After setup, key directories:
# /var/lib/jenkins/     — Jenkins home (jobs, plugins, credentials)
# /var/log/jenkins/     — Jenkins logs
# /etc/sysconfig/jenkins — Service configuration (JAVA_OPTS, port, etc.)

Step 5 — Manage Jenkins Service

systemctl status jenkins        # Check running status
systemctl restart jenkins       # Restart after configuration changes
systemctl stop jenkins          # Stop for maintenance
journalctl -u jenkins -f        # Follow live logs

# Change the default port (edit JENKINS_PORT in /etc/sysconfig/jenkins)
sed -i 's/JENKINS_PORT="8080"/JENKINS_PORT="9090"/' /etc/sysconfig/jenkins
systemctl restart jenkins

Conclusion

Jenkins LTS on RHEL 9 provides a production-ready CI/CD platform with extensive plugin support and a large community. The LTS release line receives bug fix updates every 4 weeks and security fixes as needed, making it more appropriate for production use than the weekly releases. The initial “Install suggested plugins” step installs Git, Pipeline, Blue Ocean (modern UI), and other commonly needed plugins — for a minimal installation, choose “Select plugins to install” to reduce the attack surface and startup time. After the initial setup, configure regular Jenkins backups of the /var/lib/jenkins directory to protect pipeline configurations, credentials, and build history.

Next steps: How to Configure Jenkins Pipelines and Jenkinsfile on RHEL 9, How to Install GitLab CE on RHEL 9, and How to Register a GitHub Actions Runner on RHEL 9.