Thursday, March 7, 2024

Install Jenkins on Red Hat Enterprise Linux 9 | How to setup Jenkins on RHEL | Install Jenkins on Red Hat Linux

How to Install Jenkins on RedHat Enterprise Linux 9?

Please find below steps for setting up Jenkins on RHEL 9.

Pre-requisites:

  • Memory should be t2.medium (4 GB RAM)
  • port 8080 opened in firewall rule to access Jenkins
  • Connect to EC2 instance using git bash or iTerm

update package

sudo yum update

Install wget
sudo yum install wget -y

Add Jenkins repository to yum repository
sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo

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

sudo yum upgrade -y

Java Installation

# Add required dependencies for the jenkins package 
sudo yum install fontconfig java-17-openjdk -y

Install Jenkins
sudo yum install jenkins -y
sudo systemctl daemon-reload

sudo systemctl enable jenkins

Start Jenkins
sudo systemctl start jenkins
sudo systemctl status jenkins

Now go to browser and access the Jenkins page.

http://dns_name:8080

Your page will look something like this. Now paste the password into the below Administrator password text box.

Get Jenkins Admin Password
sudo cat /var/lib/jenkins/secrets/initialAdminPassword

Copy the output of the above command.
Press Continue..Click on install suggested plug-ins..


 Install suggested plug-ins.
Now create user name and password.
enter everything as admin. at least user name as admin password as admin
Click on Save and Finish. Click on start using Jenkins. Now you should see a screen like below:


That's it. You have setup Jenkins successfully 😊

No comments:

Post a Comment

DevSecOps Bootcamp Dec 2024 Schedule | DevSecOps & AWS Azure Cloud Coaching by Coach AK | DevSecOps and Cloud Computing Online Classes

Lot of new topics covered like GitHub Actions, GitHub Advanced Security, Helm, Prometheus and Grafana..) The DevOps requirements in the IT m...