suosuo 2017-03-10
hudson介绍
Hudson是Jenkins的前身,是基于Java开发的开源的持续集成框架,用于监控程序重复的工作,其作用是可以实现项目的自动更新与部署。
安装maven
下载包
```
wget http://mirror.bit.edu.cn/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
```
安装
```
[root@ambari ~]# tar -xf apache-maven-3.3.9-bin.tar.gz
[root@ambari ~]# mv apache-maven-3.3.9 /usr/local/data/apache-maven
```
配置环境变量
```
[root@ambari ~]# vim /etc/profile
export MAVEN_HOME=/usr/local/data/apache-maven
export PATH=$PATH:$MAVEN_HOME/bin
[root@ambari ~]# source /etc/profile
[root@ambari ~]# mvn --version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00)
Maven home: /usr/local/data/apache-maven
Java version: 1.8.0_45, vendor: Oracle Corporation
Java home: /usr/local/data/jdk1.8.0_45/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-431.el6.x86_64", arch: "amd64", family: "unix"
```
安装tomcat
下载包
```
wget http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.29/bin/apache-tomcat-7.0.29.tar.gz
```
#### 安装
```
[root@ambari ~]# tar -xf apache-tomcat-7.0.29.tar.gz
[root@ambari ~]# mv apache-tomcat-7.0.29 /usr/local/data/apache-tomcat
```
安装hudson
下载包
```
[root@ambari ~]# wget http://ftp.kaist.ac.kr/eclipse/hudson/war/hudson-3.0.1.war
```
安装配置
```
[root@ambari ~]# cp hudson-3.0.1.war /usr/local/data/apache-tomcat/webapps/
[root@ambari ~]# cd /usr/local/data/apache-tomcat/webapps && mv hudson-3.0.1.war hudson.war
[root@ambari ~]# cd /usr/local/data/apache-tomcat/conf
[root@ambari conf]# vim server.xml
<Connector port="8090" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
```
启动hudson
```
[root@ambari ~]# /usr/local/data/apache-tomcat/bin/catalina.sh start
Using CATALINA_BASE: /usr/local/data/apache-tomcat
Using CATALINA_HOME: /usr/local/data/apache-tomcat
Using CATALINA_TMPDIR: /usr/local/data/apache-tomcat/temp
Using JRE_HOME: /usr/local/data/jdk1.8.0_45/
Using CLASSPATH: /usr/local/data/apache-tomcat/bin/bootstrap.jar:/usr/local/data/apache-tomcat/bin/tomcat-juli.jar
```
访问
http://192.168.1.11:6060/hudson/