Eli : Memcached, MySQL, Highcharts

Install Hudson/Jenkins on CentOS

Hudson monitors executions of repeated jobs, such as building a software project or jobs run by cron, we can use it as a continuous integration server for PHP Application.

Theses quick steps can be used to install Hudson or Jenkins, simply replace all hudson occurences with jenkins.

Let's see how to install Hudson on a CentOS 5.5 server.

Installing Java, Ant and Tomcat

yum install -y java ant
yum install tomcat5 tomcat5-webapps tomcat5-admin-webapps

Then we need to add Tomcat to our server startup

chkconfig --add tomcat5

Now edit Tomcat configuration file to add Hudson home directory (We will use /data/hudson/)

vi /etc/tomcat5/tomcat5.conf

Add at the bottom of the file

# If you wish to further customize your tomcat environment,
# put your own definitions here
# (i.e. LD_LIBRARY_PATH for some jdbc drivers)
# Just do not forget to export them :)
HUDSON_HOME=/data/hudson/
CATALINA_OPTS="-DHUDSON_HOME=/data/hudson/ -Xmx512m"


Installing Hudson 2.0.0

Go to webapps directory

cd /var/lib/tomcat5/webapps/

Download lastest version of Hudson from http://hudson-ci.org/ or latest from Jenkins from http://jenkins-ci.org/

wget http://java.net/projects/hudson/downloads/download/war/hudson-2.0.0.war
mv hudson-2.0.0.war hudson.war

Now make home folder for hudson and give it Tomcat user right

mkdir /data/hudson
chown tomcat.tomcat /data/hudson/

Restart Tomcat to finalize installation

 /etc/init.d/tomcat5 restart

Now check if everything is ok by opening a web browser and access hudson with something like http://yourhost:8080/hudson/

You will see something like this :

Hudson start screen

You can now add your project, if you have a PHP Project, check http://jenkins-php.org/ for an easy template solution.

Related Posts





comments powered by Disqus

You may also be interested in