How to install Jenkins on CentOS 7

Jenkins is an open source automation server written in Java. Jenkins helps to automate the non-human part of the software development process, with continuous integration and facilitating technical aspects of continuous delivery. It is a server-based system that runs in servlet containers such as Apache Tomcat. It supports version control tools, including AccuRev, CVS, Subversion, Git, Mercurial, Perforce, ClearCase and RTC, and can execute Apache Ant, Apache Maven and sbt based projects as well as arbitrary shell scripts Linux and Windows batch commands. Jenkins functionality can be extended with plugins.

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

Was this answer helpful? 0 Users Found This Useful (0 Votes)