Setup TeamCity on Linux

There are two ways to install TeamCity

  1. bash.tar.gz distribution
  2. docker image

I perfer the distribution one.

Before you start, make sure you have Java installed. You can check by running java -version in the terminal.

Install Java

sudo apt update
sudo apt install default-jdk
sudo apt install default-jre

Install TeamCity

Download the latest version from here, or

wget https://download.jetbrains.com/teamcity/TeamCity-2023.05.2.tar.gz

Extract the file

tar -xfz TeamCity-2023.05.2.tar.gz

Run the server

cd TeamCity/bin
./runAll.sh start

You can use ./runAll.sh stop to stop the server.

Install TeamCity agent

Download the agent from the server page (look for it by yourself).

Extract the file

tar -xfz TeamCity-agent.tar.gz

In the conf copy the buildAgent.dist.properties to buildAgent.properties

cp buildAgent.dist.properties buildAgent.properties

Then run the agent

./bin/agent.sh start

Setup TeamCity

Open the browser and go to http://localhost:8111/ to setup TeamCity.


← Back to all posts