Installing Hudson and JDK on centos, redhat or fedora.
Step 1
Download java jdk latest version from below URL.
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
Once JDK downloaded, extract JDK
#tar -zxvf jdk1.7.0_21.tgz
Add hudson repository and install hudson from associated repository by issuing below commands
There are different ways you can install hudson, using repository or download and install . Here we have used both the
Options (option1: installing hudson from repository, option2: download latest version of hudson and install using rpm installed command as indicated below)
Option 1
#wget -O /etc/yum.repos.d/hudson.repo http://hudson-ci.org/redhat/hudson.repo
#yum check-update
#yum install hudson*
OR
you can download latest version of hudson rpm package from fallowing URL.
Option 2
http://hudson-ci.org/downloads/redhat/
#wget http://hudson-ci.org/downloads/redhat/hudson-1.340-1.1.noarch.rpm
#rpm -ivh hudson-1.340-1.1.noarch.rpm
Step 2
run hudson service as independently without application server , by default hudson runs on port number 8080.
go to JDK path as indicated below or else you can set the JDK path in our example our JDK source is under /root/
#cd /root/jdk1.7.0_21/bin
To run hudson the default location of hudson.war file is (/usr/lib/hudson/hudson.war)
#./java -jar /usr/lib/hudson/hudson.war
In order to run hudson in background process you can use & suffix with above command
Step 3
invoke browser from any of machine reachable to hudson hosted server
http://ipaddress:8080
转自:http://solutionsatexperts.com/how-to-install-hudson-on-redhat-hudson-installation-steps/