》安装 Postgresql 9.4,并参照文中的描述创建数据库 tcdb 和角色 dbuser。注意,请为 tcuser 设置密码,这样就为后面配置 TeamCity 做好了准备。
》安装 JDK。
$ -xf TeamCity-...gz -C ~/
$ ./teamcity-server. start
#!/bin//etc/init.d/teamcity - startup script =/usr/lib/jdk1.=${JAVA_HOME}/=.:${JAVA_HOME}/lib:${JRE_HOME}/=${JAVA_HOME}/==-Djava.awt.headless= $ -stop-daemon --start -c tcuser --exec /home/tcuser/TeamCity/bin/teamcity-server.-stop-daemon --start -c tcuser --exec /home/tcuser/TeamCity/bin/teamcity-server.
$ update-rc.d tcserver defaults
$ apt-get /etc/nginx/sites-available/ vim /etc/nginx/sites-available/teamcity
server {
listen <span style="color: #800080;">80<span style="color: #000000;">;
server_name localhost;
proxy_read_timeout <span style="color: #800080;">1200<span style="color: #000000;">;
proxy_connect_timeout <span style="color: #800080;">240<span style="color: #000000;">;
client_max_body_size <span style="color: #800080;">0<span style="color: #000000;">;
listen <span style="color: #800080;">80<span style="color: #000000;">;
server_name localhost;
proxy_read_timeout <span style="color: #800080;">1200<span style="color: #000000;">;
proxy_connect_timeout <span style="color: #800080;">240<span style="color: #000000;">;
client_max_body_size <span style="color: #800080;">0<span style="color: #000000;">;
location </span>/<span style="color: #000000;"> {
proxy_pass http:</span><span style="color: #008000;">//</span><span style="color: #008000;">localhost:8111;</span>
proxy_http_version <span style="color: #800080;">1.1</span><span style="color: #000000;">;
proxy_set_header X</span>-Forwarded-<span style="color: #000000;">For $remote_addr;
proxy_set_header Host $server_name:$server_port;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
$ -s /etc/nginx/sites-available/teamcity /etc/nginx/sites-enabled/ /etc/nginx/sites-enabled/default
$ /etc/init.d/nginx reload