Install Jenkins
The version of Jenkins which is available by the RHEL official repository is often behind the latest version, so in order to take advantage of the latest fixes and features, we’ll use the project-maintained packages to install Jenkins.
Add the repository key with the following command:
rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
Now we will add the package repository address to our repository list with the command below:
wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
Update your package manager list to get the latest packages:
yum repolist
Finally, install Jenkins and JAVA with the following command:
yum install java-1.8.0-openjdk jenkins
Starting Jenkins
Jenkins will work as a service, so you can control it using "systemctl" command. start your Jenkins server with the following command:
systemctl start jenkins
If you want to make it run at startup execute the command below as well:
systemctl enable jenkins
You can check Jenkins service status using:
systemctl status jenkins
Setting up Jenkins
For setting up Jenkins, we need to visit its web dashboard running on the port, “8080”. So open your favorite browser and check http://your_ip_OR_domain:8080.
That's all