Install Jenkins on RHEL 8

Step 1 : Connect to your Linux machine

Set up Custom TCP port: 8080 in AWS Security Groups

Step 2: Update Packages


sudo yum update

Step 3 : Check Java is installed. If not install java


java -version
sudo yum install java-1.8.0

Step 4 : Download latest Jenkins code package


sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenk...

Step 5 : Import a key file from Jenkins-CI to enable installation from the package


sudo rpm — import http://pkg.jenkins-ci.org/redhat/jenk...

Step 6 : Install Jenkins


sudo yum install jenkins
yum install jenkins --nogpgcheck

Step 7 : Start jenkins


sudo service jenkins start

Step 8 : Access Jenkins server using the public DNS of your ec2 on port 8080

Note : Here you might have to allow port 8080 in your security group settings

http://{ec2-public-dns}:8080
example : http://3.89.79.74:8080/

Step 9: To fetch initial admin password type the following in command promt

vi /var/lib/jenkins/secrets/initialAdminPassword

Tips
To stop Jenkins

 sudo service jenkins stop

To uninstall Jenkins


sudo service jenkins stop
sudo yum remove jenkins
sudo rm -r /var/lib/jenkins

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store