最简单配置
1.去http://hudson-ci.org/ 下载最新hudson版本,hudson.war
2.运行java -jar hudson.war 启动hudson服务
hudson与tomcat集成
1.配置JAVA环境
#安装tomcat
VM159:/opt# tar zxvf /software/apache-tomcat-6.0.18.tar.gz
#安装hudson
VM159:/opt/apache-tomcat-6.0.18/webapps# cp /software/hudson.war .
#修改tomcat配置
VM159:/opt/apache-tomcat-6.0.18/webapps# cat ~/.bashrc
export JAVA_HOME=/opt/jdk1.6.0_11
export JRE_HOME=/opt/jdk1.6.0_11/jre
export PATH=$PATH:/opt/jdk1.6.0_11/bin
export CLASSPATH=./:/opt/jdk1.6.0_11/lib:/opt/jdk1.6.0_11/jre/lib
export JETTY_HOME=/opt/jetty-6.1.24
export JETTY_RUN=/var/run
export JETTY_PID=/var/run/jetty.pid
export CATALINA_OPTS="-DHUDSON_HOME=/home/hudson/ -Xmx512m"
#设置管理员
VM159:/opt/apache-tomcat-6.0.18/conf# cat tomcat-users.xml
<?xmlversion='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="manager"/>
<user username="liyafei"password="test@dbank" roles="manager"/>
</tomcat-users>
#设置I18N
VM159:/opt/apache-tomcat-6.0.18/conf # vim server.xml
67 <Connector port="8080" URIEncoding="UTF-8"protocol="HTTP/1.1"
68 connectionTimeout="20000"
69 redirectPort="8443"/>