How to install Jenkins on CentOS/RHEL
Jenkins gives consistent integration services to programming improvement. It is a server-based framework running in a servlet holder, for example, Apache Tomcat. It supports SCM devices including AccuRev, CVS, Subversion, Git, Mercurial, Perforce, Clearcase and RTC, and can execute Apache Ant and Apache Maven based tasks and self-assertive shell scripts and Windows clump summons.
Jenkins is an opensource and most famous persistent joining device written in Java. There are numerous plugins are accessible to make it more simpler. It supports all form control frameworks. You can design builts with different means like, activated by a submit in a variant control framework, scheduling by cron-jobs etc..
This article will help you to install Jenkins.
Step 1: Check Java Version
First, we have to check that Java has been installed on the server or not. Jenkins require Java 1.6 or more than. If Java version is less than 1.6 than we have to upgrade the Java. Use following command to check Java Version.
# java -version
openjdk version "1.8.0_45" OpenJDK Runtime Environment (build 1.8.0_45-b13) OpenJDK 64-Bit Server VM (build 25.45-b02, mixed mode)
Install Java 8 on CentOS/RHEL
Install Java 7 on CentOS/RHEL
Step 2: Jenkins Repository
After checking the version of Java we need to add Jenkins repositories on the server.
# wget -O /etc/yum.repos.d/jenkins.repo http://jenkins-ci.org/redhat/jenkins.repo # rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
Step 3: Install Jenkins
Use following command to install Jenkins.
# yum install jenkins
Step 4: Start Jenkins
Start Jenkins Service uses following command.
# /etc/init.d/jenkins start | stop | restart # chkconfig jenkins on
Step 5: Verify Jenkins
By default Jenkins use 8080 port. We use following command to check Jenkins is running or not.
# netstat -ntulp | grep 8080
Step 8: Change Jenkins HTTP port number
By default, Jenkins runs on port 8080. If you want to change the default port for Jenkins you need to change the file /etc/sysconfig/jenkins
# vim /etc/sysconfig/jenkins
Default: JENKINS_PORT="8080" New: JENKINS_PORT="8443"
Step 9: Access Jenkins
Go to your browser and type http://localhost:8080/. Presently you ought to ready to see the Jenkins dashboard like below image:
I hope this tutorial will help you to install Jenkins on CentOS.
hello ,
i used complete instruction which is given on this page and then i got unknown uri when i am typing in w3m localhost:8080 (w3m is web interface provider in terminal ) . service is running, port is open os is centos java version 1.8.
please tell me how can i resolve it
thanks & regards
Anoop Singh
Can you please check with following command:
# elinks localhost:8080
If elinks command not available then Please install elinks command using following command:
# yum install elinks
Let me know If still you have an issue.
thanks for the post. it is useful.