Jenkins Installation On RHEL
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
1. Install java
# wget https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.rpm
1
2. Install Jenkins
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
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.
2
First, we need to unlock Jenkins using a password.
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.
5
Now, we can work on Jenkins by clicking on Start using Jenkins.
6
SSL configuration
# openssl req -newkey rsa:4096 -x509 -sha256 -days 3650 -nodes -out jenkins.crt -keyout jenkins.key