Install JENKINS on CentOS/RHEL 7
With the rise of Devops culture, IT industries have changed for good. Organizations have been adopting devops resources, tools for increasing the productivity. Automation tools are gaining more and more importance & one such tool which is now being adopted at faster pace is, JENKINS.
Jenkins is famous, free & open source Continuous Integration tool that is being used for development of the projects, their deployments & automation. Jenkin in employed where we need continuous build & integration for software deployments.
In this tutorial, we will install & configure jenkins to be used on server with Centos/RHEL 7 installed, but same process can be used for installing jenkins on Centos/RHEL 6 as well.
- We need to JAVA 8 installed & configured on the server where we will be installing jenkins. We can install java using yum,
|$ yum install java-1.8.0-openjdk.x86_64|
For more detailed instructions on Java installation, read our article “INSTALLING JAVA ON CENTOS/RHEL ”
- We also need to have jenkins repository enabled on the server, as the jenkins is not available on default CentOS/RHEL repositories. To enable the jenkins repository on Centos 7, run
|$ wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo|
$ rpm –import http://pkg.jenkins-ci.org/redhat-stable/jenkins-ci.org.key
Once the repository has been enabled, we will start the installation of the jenkins.
Step 1- Installation
We will now install jenkins using the yum command,
|$ yum install jenkins|
After the installation, we need to allow port 80 & 8080 on the firewalld of the system. Run,
| $ firewall-cmd –zone=public –add-port=8080/tcp –permanent|
$ firewall-cmd –zone=public –add-service=http –permanent
$ firewall-cmd –reload
Now restart the jenkins service & enable it for boot time,
|$ systemctl start jenkins|
$ systemctl enable jenkins
Step 2- Logging to web-interface
We can now access the jenkins server through the web interface. To access the server, open the web browser & enter the url,
|$ http:// localhost or Ip address:8080|
On the page you will asked to enter the administrator password, which can be found in the jenkins log file i.e. ‘/var/log/jenkins/jenkins.log’. To retrieve the password, run
|$ grep -A 5 password /var/log/jenkins/jenkins.log|
Enter the password & you can then further configure the jenkins server as per your requirements.
That’s it for our current tutorial, in our future tutorial we will discuss how we can integrate jenkins with local repositories or with git. ADIOS !!!