How to install Jenkins Continuous Integration on CentOS 6 as service
Jenkins is an open source continuous integration tool written in Java. The project was forked from Hudson after a dispute with Oracle. Jenkins provides continuous integration services for software development. It is a server-based system running in a servlet container such as Apache Tomcat.
In this tutorial we will install Jenkins on Centos 6
#Install Latest Java 8
1 2 3 |
cd /opt wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u51-b16/jdk-8u51-linux-x64.rpm" rpm -ivh jdk-8u51-linux-x64.rpm |
#Create a link to Java
1 |
ln -s /usr/java/latest ~/java |
#Verify that Java is installed
1 2 |
java -version javac -version |
#Install Jenkins
#Add the Jenkins repository to the yum repos, and install Jenkins from here.
1 2 3 |
wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key yum install jenkins |
#Add jenkins to start up
1 |
chkconfig jenkins on |
#Start jenkins
1 |
service jenkins start |
#Check if jenkins installed
http://serveripaddress:8080/
#To fix the authentication of Jenkins
Go to the Jenkins dashboard, usually http://_server_:8080 or http://_server_/jenkins:8080, where server is the host on which Jenkins is running
Select Manage Jenkins, then Configure Global Security
Click Enable Security. The page will expand to offer a choice of access control.
Select Jenkins’ own user database
Place a check mark next to Allow users to sign up (If you want to allow users to sign up)
Continue with Authorization, below. In particular, do not forget to press the Save button at the bottom of the page.
To learn more about Jenkins:
How to install Jenkins Continuous Integration on CentOS 6 as service