Ubuntu 11.10 安装Java、JIRA/Confluence/FishEye、Nginx

[b]1. 替换Ubuntu源[/b]
编辑/etc/apt/source.list
[code]
deb http://mirrors.163.com/ubuntu/ oneiric main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ oneiric-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ oneiric-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ oneiric-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ oneiric-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ oneiric main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ oneiric-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ oneiric-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ oneiric-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ oneiric-backports main restricted universe multiverse
[/code]

[b]2. 安装Java[/b]
[code]
sudo apt-get install openjdk-7-jdk
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-i386
export PAHT=$JAVA_HOME:$PATH
[/code]

[b]3. 下载、安装、启动JIRA/Confluence/FishEye[/b]
[url]http://confluence.atlassian.com/display/JIRA/Installing+JIRA+on+Linux[/url]
[url]http://confluence.atlassian.com/display/DOC/Installing+Confluence+on+Linux[/url]
[url]http://confluence.atlassian.com/display/FISHEYE/Installing+FishEye[/url]
默认JIRA为8080端口,Confluence为8090端口,FishEye为8060端口
启动
[code]
/opt/atlassian/jira/bin/start-jira.sh
/opt/atlassian/confluence/bin/start-confluence.sh
/opt/atlassian/fecru/bin/start.sh
[/code]

[b]4. 安装Nginx并配置JIRA/Confluence/FishEye端口转发[/b]
安装Nginx
[code]
sudo apt-get install nginx
[/code]
按子域名配置proxy
[code]
# sudo vi /etc/nginx/nginx.conf
# add lines below to http {}
server {
listen 80;
server_name *.dev.xxx.com;
location / {
if ( $host ~ "jira.dev.xxx.com" ) {
proxy_pass http://localhost:8080;
}
if ( $host ~ "wiki.dev.xxx.com" ) {
proxy_pass http://localhost:8090;
}
if ( $host ~ "code.dev.xxx.com" ) {
proxy_pass http://localhost:8060;
}
proxy_connect_timeout 30s;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 32k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_redirect off;
proxy_hide_header Vary;
proxy_set_header Accept-Encoding '';
proxy_set_header Host $host;
proxy_set_header Referer $http_referer;
proxy_set_header Cookie $http_cookie;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}

[/code]
启动
[code]
sudo /etc/init.d/nginx start
[/code]

[b]5. 配置JIRA/Confluence/FishEye[/b]
访问[url]http://jira.dev.xxx.com[/url]配置JIRA
访问[url]http://wiki.dev.xxx.com[/url]配置Confluence
访问[url]http://code.dev.xxx.com[/url]配置FishEye

[b]6. 集成JIRA/Confluence/FishEye[b]
[url]http://confluence.atlassian.com/display/DOC/Integrating+JIRA+and+Confluence[/url]
[url]http://confluence.atlassian.com/display/JIRA/Integrating+JIRA+with+FishEye[/url]
[url]http://confluence.atlassian.com/display/DOC/Enabling+the+Remote+API[/url]

[b]7. Git hook[/b]
.git/hooks/commit-msg
[code]
#!/bin/sh
test "" != "$(egrep '[A-Z]+-[0-9]+,' "$1")" || {
echo >&2 "ERROR: Commit message is missing JIRA issue number."
exit 1
}
[/code]

你可能感兴趣的:(Linux,Java)