Jenkins Installation
Estimated time to read: 3 minutes
Manual Installation On RHEL
Prerequisites
- Minimum hardware requirements:
- 256 MB of RAM
- 1 GB of drive space (although 10 GB is a recommended minimum if running Jenkins as a Docker container)
- Recommended hardware configuration for a small team:
- 4 GB+ of RAM
- 50 GB+ of drive space
Long Term Support release
- Install Supporting packages
- Setup the Jenkins stable Repository
- Install JDK
- Install Jenkins and reload demon
Start Jenkins
- You can enable the Jenkins service to start at boot with the command
- You can start the Jenkins service with the command
- You can check the status of the Jenkins service using the command
Installation Using Shell Script
Method 1
- Create new file named as
jenkins.sh
- Add the below code in jenkins.sh file
#/bin/bash #Author: Opsfusionlabs #Orgination: OpsfusionLabs sudo yum install wget tree -y 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 sudo yum install fontconfig java-17-openjdk -y sudo yum install jenkins -y sudo systemctl daemon-reload sudo systemctl enable jenkins sudo systemctl start jenkins sudo systemctl status jenkins --no-pager
- Change the file permission to make as a executable file
- Run Shell Script
Method 2
- Clone git repo
- Change the file permission to make as a executable file
- Run Shell Script
Post-installation setup wizard
- Browse to
http://localhost:8080
(or whichever port you configured for Jenkins when installing it) and wait until the Unlock Jenkins page appears.
-
The command:
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
will print the password at console. -
Install suggested plugins - to install the recommended set of plugins, which are based on most common use cases.
-
When the Create First Admin User page appears, specify the details for your administrator user in the respective fields and click Save and Finish.