安裝maven
下載maven,解壓
[root@localhost local]# pwd
/usr/local [root@localhost local]# tar -zxvf apache-maven-3.0.5-bin.tar.gz [root@localhost local]# cd apache-maven-3.0.5/ [root@localhost apache-maven-3.0.5]# pwd
/usr/local/apache-maven-3.0.5
配置maven環境變量
[root@localhost apache-maven-3.0.5]# vim /etc/profile # 在profile文件末尾增長以下配置 # maven env export MAVEN_HOME=/usr/local/apache-maven-3.0.5 export PATH=$MAVEN_HOME/bin:$PATH [root@localhost apache-maven-3.0.5]# source /etc/profile [root@localhost apache-maven-3.0.5]# mvn -version Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 05:51:28-0800) Maven home: /usr/local/apache-maven-3.0.5 Java version: 1.7.0_79, vendor: Oracle Corporation Java home: /usr/local/jdk1.7.0_79/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "2.6.32-504.16.2.el6.x86_64", arch: "amd64", family: "unix"
安裝Hudsonhtml
1.配置nginx
[root@localhost domains]# cat tools.hudson.local.com upstream tomcat_tools.hudson.local { server 127.0.0.1:8025 weight=10 max_fails=2 fail_timeout=300s; } server { listen 80; server_name tools.hudson.local.com; root /export/data/javaRoot/tools.hudson.local.com/; access_log /export/nginx/logs/tools.hudson.local.com/tools.hudson.local.com_access.log main; error_log /export/nginx/logs/tools.hudson.local.com/tools.hudson.local.com_error.log warn; error_page 403 404 /40x.html; location / { index index.html index.htm; proxy_next_upstream http_500 http_502 http_503 http_504 error timeout invalid_header; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://tomcat_tools.hudson.local;
expires 0d; } }
2、部署tomcat實例
[root@localhost tools.hudson.local.com]# pwd
/export/data/javaRoot/tools.hudson.local.com [root@localhost tools.hudson.local.com]# unzip hudson-3.2.2.war [root@localhost tools.hudson.local.com]# mkdir /usr/local/hudson-home -p
配置husonHome,huson插件會安裝到這個路徑下
[root@localhost tools.hudson.local.com]# vim /etc/profile # 在末尾增長Hudson_HOME配置 # hudson env export HUDSON_HOME=/usr/local/hudson-home [root@localhost tools.hudson.local.com]# source /etc/profile
三、啓動tomcat服務,訪問http://tools.hudson.local.comjava
首次安裝:能夠直接安裝默認勾選的三個插件便可,後面能夠在安裝完成以後根據須要安裝其它的插件.安裝完成的界面以下:
點擊Install,安裝完後界面會自行跳轉.
安裝插件信息查看:http://tools.hudson.local.com/pluginManager/available
配置Hudson
a)系統管理/Configure Security中啓動安全配置
註冊剛纔配置的admin帳號.
b)全局信息配置,與插件配置
轉載請註明出處:[http://www.cnblogs.com/dennisit/p/4547087.html]