Skip to content

Instantly share code, notes, and snippets.

@haraldreingruber
Forked from sandcastle/install-teamcity.md
Last active September 24, 2015 21:38

Revisions

  1. Harald Reingruber revised this gist Sep 24, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-teamcity.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    Install
    ==========

    Follow the steps below to install Team City 9.0.3 on Ubuntu with Nginx as the proxy for port 80.
    Follow the steps below to install Team City 9.1.3 on Ubuntu with Nginx as the proxy for port 80.


    Install Team City:
  2. haraldreingruber revised this gist Sep 24, 2015. No changes.
  3. Harald Reingruber revised this gist Sep 24, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion teamcity-install.sh
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ sudo apt-get install -y openjdk-8-jre-headless
    sudo apt-get install -y curl

    # install build agent dependencies
    sudo apt-get install -y mercurial
    #sudo apt-get install -y mercurial
    sudo apt-get install -y git

    # install team city
  4. Harald Reingruber revised this gist Sep 24, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion teamcity-install.sh
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@ cd /

    # install server dependencies
    sudo apt-get update
    sudo apt-get install -y openjdk-7-jre-headless
    sudo apt-get install -y openjdk-8-jre-headless
    sudo apt-get install -y curl

    # install build agent dependencies
  5. Harald Reingruber revised this gist Sep 24, 2015. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions teamcity-install.sh
    Original file line number Diff line number Diff line change
    @@ -12,9 +12,9 @@ sudo apt-get install -y mercurial
    sudo apt-get install -y git

    # install team city
    sudo wget -c https://download.jetbrains.com/teamcity/TeamCity-9.0.3.tar.gz -O /tmp/TeamCity-9.0.3.tar.gz
    sudo tar -xvf /tmp/TeamCity-9.0.3.tar.gz -C /srv
    sudo rm -rf /tmp/TeamCity-9.0.3.tar.gz
    sudo wget -c https://download.jetbrains.com/teamcity/TeamCity-9.1.3.tar.gz -O /tmp/TeamCity-9.1.3.tar.gz
    sudo tar -xvf /tmp/TeamCity-9.1.3.tar.gz -C /srv
    sudo rm -rf /tmp/TeamCity-9.1.3.tar.gz
    sudo mkdir /srv/.BuildServer

    # create user
  6. Harald Reingruber revised this gist Sep 24, 2015. 3 changed files with 5 additions and 5 deletions.
    4 changes: 2 additions & 2 deletions install-teamcity.md
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@ Follow the steps below to install Team City 9.0.3 on Ubuntu with Nginx as the pr
    Install Team City:

    # will install on port 8111
    sudo wget -c https://gist.githubusercontent.com/sandcastle/9282638/raw/teamcity-install.sh -O /tmp/teamcity-install.sh
    sudo wget -c https://gist.github.com/haraldreingruber/c0dedecd07af9ed3ed9d/raw/teamcity-install.sh -O /tmp/teamcity-install.sh
    sudo sh /tmp/teamcity-install.sh
    sudo rm -rf /tmp/teamcity-install.sh

    @@ -23,7 +23,7 @@ Update the database settings:
    Install Nginx:

    #will proxy port 80 to team city on 8111
    sudo wget -c https://gist.githubusercontent.com/sandcastle/9282638/raw/nginx.sh -O /tmp/nginx.sh
    sudo wget -c https://gist.github.com/haraldreingruber/c0dedecd07af9ed3ed9d/raw/nginx.sh -O /tmp/nginx.sh
    sudo sh /tmp/nginx.sh
    sudo rm -rf /tmp/nginx.sh

    2 changes: 1 addition & 1 deletion nginx.sh
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@
    sudo apt-get install -y nginx

    # update the config
    sudo wget https://gist.githubusercontent.com/sandcastle/9282638/raw/nginx.conf -O /etc/nginx/sites-available/teamcity
    sudo wget https://gist.github.com/haraldreingruber/c0dedecd07af9ed3ed9d/raw/nginx.conf -O /etc/nginx/sites-available/teamcity
    sudo mkdir -p /var/www/teamcity

    # create syn link
    4 changes: 2 additions & 2 deletions teamcity-install.sh
    Original file line number Diff line number Diff line change
    @@ -23,15 +23,15 @@ sudo chown -R teamcity /srv/TeamCity
    sudo chown -R teamcity /srv/.BuildServer

    # create init.d script
    sudo wget https://gist.githubusercontent.com/sandcastle/9282638/raw/teamcity-init.sh -O /etc/init.d/teamcity
    sudo wget https://gist.github.com/haraldreingruber/c0dedecd07af9ed3ed9d/raw/teamcity-init.sh -O /etc/init.d/teamcity
    sudo chmod 775 /etc/init.d/teamcity
    sudo update-rc.d teamcity defaults

    # download postgres
    sudo mkdir -p /srv/.BuildServer/lib/jdbc
    sudo mkdir -p /srv/.BuildServer/config
    sudo wget http://jdbc.postgresql.org/download/postgresql-9.3-1101.jdbc41.jar -O /srv/.BuildServer/lib/jdbc/postgresql-9.3-1101.jdbc41.jar
    sudo wget https://gist.githubusercontent.com/sandcastle/9282638/raw/postgres.database.properties -O /srv/.BuildServer/config/database.properties
    sudo wget https://gist.github.com/haraldreingruber/c0dedecd07af9ed3ed9d/raw/postgres.database.properties -O /srv/.BuildServer/config/database.properties

    # ensure owership
    sudo chown -R teamcity /srv/TeamCity
  7. @sandcastle sandcastle revised this gist Mar 29, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-teamcity.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    Install
    ==========

    Follow the steps below to install Team City 8.1 on Ubuntu 12.04 with Nginx as the proxy for port 80.
    Follow the steps below to install Team City 9.0.3 on Ubuntu with Nginx as the proxy for port 80.


    Install Team City:
  8. @sandcastle sandcastle revised this gist Mar 29, 2015. 2 changed files with 24 additions and 7 deletions.
    25 changes: 21 additions & 4 deletions nginx.conf
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,27 @@
    # We need to support websockets from TC 9.x onwards
    # https://confluence.jetbrains.com/display/TCD9/How+To...#HowTo...-SetUpTeamCitybehindaProxyServer

    map $http_upgrade $connection_upgrade {
    default upgrade;
    '' '';
    }

    server {
    client_max_body_size 150M;

    listen 80;
    server_name localhost <yourdomainname.com>;
    root /var/www/teamcity;
    server_name localhost <DNS-ENTRY-HERE>;

    proxy_read_timeout 1200;
    proxy_connect_timeout 240;
    client_max_body_size 0;

    location / {
    proxy_pass http://127.0.0.1:8111;

    proxy_pass http://localhost:8111/tc;
    proxy_http_version 1.1;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header Host $server_name:$server_port;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
    }
    }
    6 changes: 3 additions & 3 deletions teamcity-install.sh
    Original file line number Diff line number Diff line change
    @@ -12,9 +12,9 @@ sudo apt-get install -y mercurial
    sudo apt-get install -y git

    # install team city
    sudo wget -c http://download.jetbrains.com/teamcity/TeamCity-8.1.2.tar.gz -O /tmp/TeamCity-8.1.2.tar.gz
    sudo tar -xvf /tmp/TeamCity-8.1.2.tar.gz -C /srv
    sudo rm -rf /tmp/TeamCity-8.1.2.tar.gz
    sudo wget -c https://download.jetbrains.com/teamcity/TeamCity-9.0.3.tar.gz -O /tmp/TeamCity-9.0.3.tar.gz
    sudo tar -xvf /tmp/TeamCity-9.0.3.tar.gz -C /srv
    sudo rm -rf /tmp/TeamCity-9.0.3.tar.gz
    sudo mkdir /srv/.BuildServer

    # create user
  9. @sandcastle sandcastle revised this gist May 25, 2014. 1 changed file with 17 additions and 8 deletions.
    25 changes: 17 additions & 8 deletions teamcity-init.sh
    Original file line number Diff line number Diff line change
    @@ -3,14 +3,23 @@
    export TEAMCITY_DATA_PATH="/srv/.BuildServer"

    case $1 in
    start)
    start-stop-daemon --start -c teamcity --exec /srv/TeamCity/bin/teamcity-server.sh start
    ;;

    stop)
    start-stop-daemon --start -c teamcity --exec /srv/TeamCity/bin/teamcity-server.sh stop
    ;;

    start)
    echo "Starting Team City"
    start-stop-daemon --start -c teamcity --exec /srv/TeamCity/bin/teamcity-server.sh start
    ;;
    stop)
    echo "Stopping Team City"
    start-stop-daemon --start -c teamcity --exec /srv/TeamCity/bin/teamcity-server.sh stop
    ;;
    restart)
    echo "Restarting Team City"
    start-stop-daemon --start -c teamcity --exec /srv/TeamCity/bin/teamcity-server.sh stop
    start-stop-daemon --start -c teamcity --exec /srv/TeamCity/bin/teamcity-server.sh start
    ;;
    *)
    echo "Usage: /etc/init.d/teamcity {start|stop|restart}"
    exit 1
    ;;
    esac

    exit 0
  10. @sandcastle sandcastle renamed this gist May 25, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  11. @sandcastle sandcastle revised this gist May 18, 2014. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion teamcity-install.sh
    Original file line number Diff line number Diff line change
    @@ -31,4 +31,8 @@ sudo update-rc.d teamcity defaults
    sudo mkdir -p /srv/.BuildServer/lib/jdbc
    sudo mkdir -p /srv/.BuildServer/config
    sudo wget http://jdbc.postgresql.org/download/postgresql-9.3-1101.jdbc41.jar -O /srv/.BuildServer/lib/jdbc/postgresql-9.3-1101.jdbc41.jar
    sudo wget https://gist.githubusercontent.com/sandcastle/9282638/raw/postgres.database.properties -O /srv/.BuildServer/config/database.properties
    sudo wget https://gist.githubusercontent.com/sandcastle/9282638/raw/postgres.database.properties -O /srv/.BuildServer/config/database.properties

    # ensure owership
    sudo chown -R teamcity /srv/TeamCity
    sudo chown -R teamcity /srv/.BuildServer
  12. @sandcastle sandcastle revised this gist May 18, 2014. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion postgres-9-3.md
    Original file line number Diff line number Diff line change
    @@ -36,4 +36,8 @@ Access the psql command line:

    # create the team city user
    create role teamcity with login password '<password>';
    create database teamcity owner teamcity;
    create database teamcity owner teamcity;

    Restart postgres:

    sudo /etc/init.d/postgresql restart
  13. @sandcastle sandcastle revised this gist May 18, 2014. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion postgres-9-3.md
    Original file line number Diff line number Diff line change
    @@ -32,4 +32,8 @@ Access the psql command line:
    sudo su - postgres

    # load the command line
    psql
    psql

    # create the team city user
    create role teamcity with login password '<password>';
    create database teamcity owner teamcity;
  14. @sandcastle sandcastle revised this gist May 18, 2014. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion install.md
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,10 @@ Install Team City:
    sudo wget -c https://gist.githubusercontent.com/sandcastle/9282638/raw/teamcity-install.sh -O /tmp/teamcity-install.sh
    sudo sh /tmp/teamcity-install.sh
    sudo rm -rf /tmp/teamcity-install.sh


    Install Postgres 9.3:

    See postgres-9-3.md below

    Update the database settings:

  15. @sandcastle sandcastle revised this gist May 18, 2014. 1 changed file with 35 additions and 0 deletions.
    35 changes: 35 additions & 0 deletions postgres-9-3.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,35 @@
    Install
    ==========

    The following steps should be followed to install and configure postgres.

    Install postgres 9.3:

    sudo apt-get update
    sudo apt-get install postgresql postgresql-contrib

    Configure remote access:

    # open the file and append the lines below
    sudo nano /etc/postgresql/9.3/main/pg_hba.conf

    # remote access (where x.x.x.x is your IP)
    host all all x.x.x.x/32 md5

    # servers (repeat this line per server)
    host all all x.x.x.x/32 md5

    Configure listening:

    # open the file and change the lines below
    sudo nano /etc/postgresql/9.3/main/postgresql.conf

    listen_addresses = '*'

    Access the psql command line:

    # switch user to the postgres user
    sudo su - postgres

    # load the command line
    psql
  16. @sandcastle sandcastle revised this gist May 17, 2014. 1 changed file with 4 additions and 7 deletions.
    11 changes: 4 additions & 7 deletions install.md
    Original file line number Diff line number Diff line change
    @@ -28,14 +28,11 @@ Update nginx config:

    sudo nano /etc/nginx/sites-available/teamcity

    Disable the default ngnix ports:
    Remove the default ngnix server:

    sudo nano cd /etc/nginx/sites-available/default

    # find the two lines below and comment out with a # at the start
    listen 80 default_server;
    listen [::]:80 default_server ipv6only=on;

    sudo rm -rf /etc/nginx/sites-enabled/default
    sudo rm -rf /etc/nginx/sites-available/default

    Start it up:

    sudo /etc/init.d/nginx start
  17. @sandcastle sandcastle revised this gist May 17, 2014. 1 changed file with 8 additions and 1 deletion.
    9 changes: 8 additions & 1 deletion install.md
    Original file line number Diff line number Diff line change
    @@ -27,7 +27,14 @@ Install Nginx:
    Update nginx config:

    sudo nano /etc/nginx/sites-available/teamcity


    Disable the default ngnix ports:

    sudo nano cd /etc/nginx/sites-available/default

    # find the two lines below and comment out with a # at the start
    listen 80 default_server;
    listen [::]:80 default_server ipv6only=on;

    Start it up:

  18. @sandcastle sandcastle revised this gist May 17, 2014. 1 changed file with 3 additions and 4 deletions.
    7 changes: 3 additions & 4 deletions teamcity-install.sh
    Original file line number Diff line number Diff line change
    @@ -10,12 +10,11 @@ sudo apt-get install -y curl
    # install build agent dependencies
    sudo apt-get install -y mercurial
    sudo apt-get install -y git
    sudo apt-get install -y mono-complete

    # install team city
    sudo wget -c http://download.jetbrains.com/teamcity/TeamCity-8.1a.tar.gz -O /tmp/TeamCity-8.1a.tar.gz
    sudo tar -xvf /tmp/TeamCity-8.1a.tar.gz -C /srv
    sudo rm -rf /tmp/TeamCity-8.1a.tar.gz
    sudo wget -c http://download.jetbrains.com/teamcity/TeamCity-8.1.2.tar.gz -O /tmp/TeamCity-8.1.2.tar.gz
    sudo tar -xvf /tmp/TeamCity-8.1.2.tar.gz -C /srv
    sudo rm -rf /tmp/TeamCity-8.1.2.tar.gz
    sudo mkdir /srv/.BuildServer

    # create user
  19. @sandcastle sandcastle revised this gist Mar 1, 2014. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions nginx.conf
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    server {
    client_max_body_size 150M;
    listen 80;
    server_name localhost <yourdomainname.com>;
    root /var/www/teamcity;
  20. @sandcastle sandcastle revised this gist Mar 1, 2014. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion teamcity-install.sh
    Original file line number Diff line number Diff line change
    @@ -2,12 +2,15 @@

    cd /

    # install dependencies
    # install server dependencies
    sudo apt-get update
    sudo apt-get install -y openjdk-7-jre-headless
    sudo apt-get install -y curl

    # install build agent dependencies
    sudo apt-get install -y mercurial
    sudo apt-get install -y git
    sudo apt-get install -y mono-complete

    # install team city
    sudo wget -c http://download.jetbrains.com/teamcity/TeamCity-8.1a.tar.gz -O /tmp/TeamCity-8.1a.tar.gz
  21. @sandcastle sandcastle revised this gist Mar 1, 2014. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions teamcity-install.sh
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,8 @@ cd /
    sudo apt-get update
    sudo apt-get install -y openjdk-7-jre-headless
    sudo apt-get install -y curl
    sudo apt-get install -y mercurial
    sudo apt-get install -y git

    # install team city
    sudo wget -c http://download.jetbrains.com/teamcity/TeamCity-8.1a.tar.gz -O /tmp/TeamCity-8.1a.tar.gz
  22. @sandcastle sandcastle revised this gist Mar 1, 2014. 2 changed files with 3 additions and 3 deletions.
    2 changes: 1 addition & 1 deletion install.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    Install
    ==========

    Follow the steps below to install Team City 8.1 on Ubuntu 12.04 with Nginx as the proxy for accessing it via port 80.
    Follow the steps below to install Team City 8.1 on Ubuntu 12.04 with Nginx as the proxy for port 80.


    Install Team City:
    4 changes: 2 additions & 2 deletions teamcity-install.sh
    Original file line number Diff line number Diff line change
    @@ -15,8 +15,8 @@ sudo mkdir /srv/.BuildServer

    # create user
    sudo useradd -m teamcity
    sudo chown teamcity /srv/TeamCity
    sudo chown teamcity /srv/.BuildServer
    sudo chown -R teamcity /srv/TeamCity
    sudo chown -R teamcity /srv/.BuildServer

    # create init.d script
    sudo wget https://gist.githubusercontent.com/sandcastle/9282638/raw/teamcity-init.sh -O /etc/init.d/teamcity
  23. @sandcastle sandcastle revised this gist Mar 1, 2014. 1 changed file with 26 additions and 26 deletions.
    52 changes: 26 additions & 26 deletions install.md
    Original file line number Diff line number Diff line change
    @@ -6,54 +6,54 @@ Follow the steps below to install Team City 8.1 on Ubuntu 12.04 with Nginx as th

    Install Team City:

    # will install on port 8111
    sudo wget -c https://gist.githubusercontent.com/sandcastle/9282638/raw/teamcity-install.sh -O /tmp/teamcity-install.sh
    sudo sh /tmp/teamcity-install.sh
    sudo rm -rf /tmp/teamcity-install.sh
    # will install on port 8111
    sudo wget -c https://gist.githubusercontent.com/sandcastle/9282638/raw/teamcity-install.sh -O /tmp/teamcity-install.sh
    sudo sh /tmp/teamcity-install.sh
    sudo rm -rf /tmp/teamcity-install.sh


    Update the database settings:

    sudo nano /srv/.BuildServer/config/database.properties
    sudo nano /srv/.BuildServer/config/database.properties


    Install Nginx:

    #will proxy port 80 to team city on 8111
    sudo wget -c https://gist.githubusercontent.com/sandcastle/9282638/raw/nginx.sh -O /tmp/nginx.sh
    sudo sh /tmp/nginx.sh
    sudo rm -rf /tmp/nginx.sh
    #will proxy port 80 to team city on 8111
    sudo wget -c https://gist.githubusercontent.com/sandcastle/9282638/raw/nginx.sh -O /tmp/nginx.sh
    sudo sh /tmp/nginx.sh
    sudo rm -rf /tmp/nginx.sh

    Update nginx config:

    sudo nano /etc/nginx/sites-available/teamcity
    sudo nano /etc/nginx/sites-available/teamcity


    Start it up:

    sudo /etc/init.d/nginx start
    sudo /etc/init.d/teamcity start
    sudo /etc/init.d/nginx start
    sudo /etc/init.d/teamcity start


    Commands:

    #start team city
    sudo /etc/init.d/teamcity start
    #start team city
    sudo /etc/init.d/teamcity start

    #stop team city
    sudo /etc/init.d/teamcity stop
    #stop team city
    sudo /etc/init.d/teamcity stop

    #star nginx
    sudo /etc/init.d/nginx start
    #star nginx
    sudo /etc/init.d/nginx start

    #stop nginx
    sudo /etc/init.d/nginx stop
    #stop nginx
    sudo /etc/init.d/nginx stop

    #reload nginx
    sudo /etc/init.d/nginx reload
    #reload nginx
    sudo /etc/init.d/nginx reload

    #test team city on port 8111
    curl http://localhost:8111
    #test team city on port 8111
    curl http://localhost:8111

    #test team city on port 80
    curl http://localhost:80
    #test team city on port 80
    curl http://localhost:80
  24. @sandcastle sandcastle revised this gist Mar 1, 2014. 1 changed file with 37 additions and 26 deletions.
    63 changes: 37 additions & 26 deletions install.md
    Original file line number Diff line number Diff line change
    @@ -1,48 +1,59 @@
    Install
    ==========

    Follow the steps below to install Team City 8.1 on Ubuntu 12.04 with Nginx as the proxy for accessing it via port 80.


    Install Team City:

    # will install on port 8111
    sudo wget -c https://gist.githubusercontent.com/sandcastle/9282638/raw/teamcity-install.sh -O /tmp/teamcity-install.sh
    sudo sh /tmp/teamcity-install.sh
    sudo rm -rf /tmp/teamcity-install.sh
    # will install on port 8111
    sudo wget -c https://gist.githubusercontent.com/sandcastle/9282638/raw/teamcity-install.sh -O /tmp/teamcity-install.sh
    sudo sh /tmp/teamcity-install.sh
    sudo rm -rf /tmp/teamcity-install.sh


    Update the database settings:

    sudo nano /srv/.BuildServer/config/database.properties


    Start Team City:
    sudo nano /srv/.BuildServer/config/database.properties

    sudo /etc/init.d/teamcity start


    Install Nginx:

    #will proxy port 80 to team city on 8111
    sudo wget -c https://gist.githubusercontent.com/sandcastle/9282638/raw/nginx.sh -O /tmp/nginx.sh
    sudo sh /tmp/nginx.sh
    sudo rm -rf /tmp/nginx.sh
    #will proxy port 80 to team city on 8111
    sudo wget -c https://gist.githubusercontent.com/sandcastle/9282638/raw/nginx.sh -O /tmp/nginx.sh
    sudo sh /tmp/nginx.sh
    sudo rm -rf /tmp/nginx.sh

    Update nginx config:

    sudo nano /etc/nginx/sites-available/teamcity


    Start it up:

    sudo /etc/init.d/nginx start
    sudo /etc/init.d/teamcity start


    Commands:

    #start team city
    sudo /etc/init.d/teamcity stop
    #start team city
    sudo /etc/init.d/teamcity start

    #stop team city
    sudo /etc/init.d/teamcity stop
    #stop team city
    sudo /etc/init.d/teamcity stop

    #stop nginx
    sudo /etc/init.d/nginx stop
    #star nginx
    sudo /etc/init.d/nginx start

    #stop nginx
    sudo /etc/init.d/nginx stop

    #reload nginx
    sudo /etc/init.d/nginx reload
    #reload nginx
    sudo /etc/init.d/nginx reload

    #test team city on port 8111
    curl -O http://localhost:8111
    #test team city on port 8111
    curl http://localhost:8111

    #test team city on port 80
    curl -O http://localhost:80
    #test team city on port 80
    curl http://localhost:80
  25. @sandcastle sandcastle revised this gist Mar 1, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install.md
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,7 @@ Install Team City:

    Update the database settings:

    /srv/.BuildServer/config/database.properties
    sudo nano /srv/.BuildServer/config/database.properties


    Start Team City:
  26. @sandcastle sandcastle revised this gist Mar 1, 2014. 1 changed file with 12 additions and 5 deletions.
    17 changes: 12 additions & 5 deletions install.md
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,9 @@
    Install
    ==========

    Install Team City on port 8111 (default):
    Install Team City:

    # will install on port 8111
    sudo wget -c https://gist.githubusercontent.com/sandcastle/9282638/raw/teamcity-install.sh -O /tmp/teamcity-install.sh
    sudo sh /tmp/teamcity-install.sh
    sudo rm -rf /tmp/teamcity-install.sh
    @@ -13,12 +14,12 @@ Update the database settings:
    /srv/.BuildServer/config/database.properties


    Start team city:
    Start Team City:

    sudo /etc/init.d/teamcity start


    Install nginx:
    Install Nginx:

    #will proxy port 80 to team city on 8111
    sudo wget -c https://gist.githubusercontent.com/sandcastle/9282638/raw/nginx.sh -O /tmp/nginx.sh
    @@ -37,5 +38,11 @@ Commands:
    #stop nginx
    sudo /etc/init.d/nginx stop

    #reload nginix
    sudo /etc/init.d/nginx reload
    #reload nginx
    sudo /etc/init.d/nginx reload

    #test team city on port 8111
    curl -O http://localhost:8111

    #test team city on port 80
    curl -O http://localhost:80
  27. @sandcastle sandcastle revised this gist Mar 1, 2014. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion install.md
    Original file line number Diff line number Diff line change
    @@ -18,8 +18,9 @@ Start team city:
    sudo /etc/init.d/teamcity start


    Install nginx
    Install nginx:

    #will proxy port 80 to team city on 8111
    sudo wget -c https://gist.githubusercontent.com/sandcastle/9282638/raw/nginx.sh -O /tmp/nginx.sh
    sudo sh /tmp/nginx.sh
    sudo rm -rf /tmp/nginx.sh
  28. @sandcastle sandcastle revised this gist Mar 1, 2014. 1 changed file with 11 additions and 1 deletion.
    12 changes: 11 additions & 1 deletion install.md
    Original file line number Diff line number Diff line change
    @@ -25,6 +25,16 @@ Install nginx
    sudo rm -rf /tmp/nginx.sh


    To stop team city, use:
    Commands:

    #start team city
    sudo /etc/init.d/teamcity stop

    #stop team city
    sudo /etc/init.d/teamcity stop

    #stop nginx
    sudo /etc/init.d/nginx stop

    #reload nginix
    sudo /etc/init.d/nginx reload
  29. @sandcastle sandcastle revised this gist Mar 1, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion teamcity-install.sh
    Original file line number Diff line number Diff line change
    @@ -20,7 +20,7 @@ sudo chown teamcity /srv/.BuildServer

    # create init.d script
    sudo wget https://gist.githubusercontent.com/sandcastle/9282638/raw/teamcity-init.sh -O /etc/init.d/teamcity
    sudo chmod 755 /etc/init.d/teamcity
    sudo chmod 775 /etc/init.d/teamcity
    sudo update-rc.d teamcity defaults

    # download postgres
  30. @sandcastle sandcastle revised this gist Mar 1, 2014. 1 changed file with 1 addition and 3 deletions.
    4 changes: 1 addition & 3 deletions nginx.conf
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,4 @@ server {
    location / {
    proxy_pass http://127.0.0.1:8111;
    }
    }

    aa
    }