0% found this document useful (0 votes)
36 views7 pages

Jenkins Installation On RHEL

The document provides steps to install and configure Jenkins on RHEL. It outlines prerequisites of Java 8+, port 8080 open, 256MB RAM, 1GB HDD. It then details downloading Java and Jenkins RPM files, installing them with RPM, enabling and starting the Jenkins service, and accessing the initial admin password to complete setup.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views7 pages

Jenkins Installation On RHEL

The document provides steps to install and configure Jenkins on RHEL. It outlines prerequisites of Java 8+, port 8080 open, 256MB RAM, 1GB HDD. It then details downloading Java and Jenkins RPM files, installing them with RPM, enabling and starting the Jenkins service, and accessing the initial admin password to complete setup.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Jenkins Installation on RHEL

Pre-requisites:-

1. Java 8 or later
2. Port 8080 should be allowed on firewall
3. 256 MB RAM
4. 1 GB HDD

Steps to install and configure Jenkins:-

1. Install java

As Jenkins is based on java so first of all we need to install Java 8 or later.

Here we are going to install java 17

Java can be downloaded from the below given link-


https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.rpm

# wget https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.rpm

After downloading the java, install it using command rpm –ivh


# rpm -ivh jdk-17_linux-x64_bin.rpm

We can check the installed java version


# java -version

After installing java, we can proceed towards installation of jenkins.

1
2. Install Jenkins

We can download the jenkins rpm file from below link.

https://get.jenkins.io/redhat-stable/jenkins-2.414.3-1.1.noarch.rpm
# wget https://get.jenkins.io/redhat-stable/jenkins-2.414.3-1.1.noarch.rpm

Then install jenkins using command rpm –ivh


# rpm -ivh jenkins-2.414.3-1.1.noarch.rpm

After installation run the below commands to enable and start the Jenkins service.
# systemctl daemon-reload
# systemctl enable jenkins
# systemctl start jenkins
# systemctl status jenkins

To access jenkins url from external system, firewall can be configured to allow jenkins default port
8080.
# firewall-cmd --permanent --zone=public --add-port=8080/tcp
# firewall-cmd --reload

3. Setup Jenkins

Once, Jenkins basic configurations are done on jenkins server, we need to set up the Jenkins
before accessing the Jenkins web interface.

Open a browser and Access Jenkins url http://192.168.31.85:8080/

2
First, we need to unlock Jenkins using a password.

The password file is /var/lib/Jenkins/secrets/initialAdminPassword


# cat /var/lib/Jenkins/secrets/initialAdminPassword

Copy the password and paste it in the text field & click on continue.

3
Two options will be shown ‘Install suggested plugins’ or ‘Select plugins to install’. We proceed with
the ‘Install suggested plugins’ option as of now.

Installation of Jenkins plugins has been started. It will take some time to complete the installation.

Create the Admin account for Jenkins Portal. Here we use username as ‘devops’.

4
In ‘Instance Configuration’ page, it will ask to set the default URL for the Jenkins. Click on Save and
Finish to proceed.

Jenkins installation has been completed successfully.

5
Now, we can work on Jenkins by clicking on Start using Jenkins.

Jenkins’s dashboard will appear as below.

6
SSL configuration

Create a directory openssl in /opt/ directory

Create self-signed certificate and a key

# openssl req -newkey rsa:4096 -x509 -sha256 -days 3650 -nodes -out jenkins.crt -keyout jenkins.key

Test the certificate is correct

# openssl x509 -in jenkins.crt -noout –text

You might also like