Tuesday, February 21, 2012

Installing Jenkins-CI integrated to Github

Installing Jenkins-CI integrated to Github

Step 1. Prerequisites.
* Make sure you have root access.
* Jenkins uses java. Make sure you have java installed. Check your java version by:
java -version
If you don't have java, installing it is as easy as pie:
yum install java-1.6.0-openjdk java-1.6.0-openjdk-devel


Step 2. Installing Jenkins
We just have to get the RedHat Jenkins repo and install it via yum like this:
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.reposudo rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.keysudo yum install jenkins
The Jenkins config file is located in /etc/sysconfig/jenkins. You can modify port settings, log directories on the config file by running:
sudo nano /etc/sysconfiig/jenkins
Verify if jenkins has installed properly by invoking its startup script:
sudo /etc/init.d/jenkins start
The server by default will run at port 8080. Setup a virtual host if this doesn't work for you. Stop or restart the server by replacing start with stop/restart.


Step 3. Execute Jenkins
There are two ways to run Jenkins server, either as a stand-alone application, or deployed as a standard web application onto a Java Servlet container or application server such as Tomcat.


java -jar jenkins.war
Access Jenkins by going to http://youserver:8080.

No comments:

Post a Comment