This guide walks through the steps required to install and configure Jenkins on RHEL 9, including setting up Java, dependencies, Jenkins repository, system service configuration, reverse proxy with Apache, Python tooling, Terraform, and PowerShell.
1. Install Required Dependencies
Begin by installing all essential packages, including Java 17, Git, compiler tools, Node.js, Python pip, Docker-related libraries, and others.
# dnf install -y fontconfig java-17-openjdk git gcc gcc-c++ nodejs gettext device-mapper-persistent-data lvm2 bzip2 python3-pip wget libseccomp
# java --version
Download and add the Jenkins repository for RHEL-based systems.
# 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.key
3. Install and Start Jenkins
Install Jenkins and configure it as a service.
# dnf install jenkins -y
# systemctl start jenkins
# systemctl enable jenkins
# systemctl status jenkins
# cat /var/lib/jenkins/secrets/initialAdminPassword
6bedde9c71eb4d999a5cfdfe43f0d052 -- Enter this Password & Continue
Install the suggested plugins then Click
Jenkins URL : IP Address or FQDN hostname with port no 8080 as below then Save & Finish
Now Jenkins is ready to start
Install Additional Plugin Ansible, terraform, PowerShell, GitHub, GitLab, AWS, GCP & Azure
Install and enable Apache HTTP Server.
# dnf install httpd -y
# systemctl start httpd
# systemctl start httpd
# systemctl enable httpd
# systemctl status httpd
Navigate to the Apache configuration directory:
# cd /etc/httpd/conf.d/
Navigate to the Apache configuration directory:
# cd /etc/httpd/conf.d/
# mv welcome.conf welcome.conf.bkp
# vi jenkins.conf
Restart Apache:
ProxyRequests Off
ProxyPreserveHost On
AllowEncodedSlashes NoDecode
<Proxy http://localhost:8080/*>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://localhost:8080/ nocanon
ProxyPassReverse / http://localhost:8080/
ProxyPassReverse / http://www.jenkins.ppc.com/
Restart Apache:
# systemctl restart httpd
Now Jenkins will be accessible using your domain or server IP via port 80.
http://www.jenkins.ppc.com
5. Install and Configure Python Tools
Upgrade pip and install commonly used DevOps/Cloud SDKs.
Now Jenkins will be accessible using your domain or server IP via port 80.
http://www.jenkins.ppc.com
5. Install and Configure Python Tools
Upgrade pip and install commonly used DevOps/Cloud SDKs.
# python3 -m pip install --upgrade pip
# pip3 install ansible
# pip3 install gcloud
# pip3 install gcloud
# pip3 install awscli
# pip3 install azure-cli
# pip3 install --upgrade pyvmomi
# pip3 install vmware-vcenter
# pip3 install --upgrade git+https://github.com/vmware/vsphere-automation-sdk-python.git
Create and Activate Python Virtual Environment
# python3 -m venv venv_name
Create and Activate Python Virtual Environment
# python3 -m venv venv_name
# source venv_name/bin/activate
# pip install --upgrade pip setuptools
6. Install Terraform on RHEL 9
Add the HashiCorp repo and install Terraform.
# yum install -y yum-utils
6. Install Terraform on RHEL 9
Add the HashiCorp repo and install Terraform.
# yum install -y yum-utils
# yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
# yum -y install terraform
# terraform version
7. Install PowerShell on RHEL 9
Install PowerShell from the official RPM package.
7. Install PowerShell on RHEL 9
Install PowerShell from the official RPM package.
# dnf install https://github.com/PowerShell/PowerShell/releases/download/v7.5.4/powershell-7.5.4-1.rh.x86_64.rpm
# pwsh --version
Conclusion
You've successfully installed Jenkins, configured Apache reverse proxy, set up Python cloud tooling, installed Terraform, and enabled PowerShell on RHEL 9. This setup prepares your server for end-to-end DevOps automation, CI/CD pipelines, cloud provisioning, and infrastructure management.
Feel free to extend Jenkins further using plugins and pipeline automation.