How to install Team City 10.x on ubuntu 16.X
In any software development project a Continuous Integration / Continuous Deployment DevOps environment is essential. A recent project I elected to make use of Team City & Octopus Deploy all on an Azure stack.
In this post I twill detail the steps on how to install and configure Team City 10.x on a Ubuntu 16.X server.
Team City is a Java Based application and therefore needs the JRE & JDK installed with the
JAVA_HOME environment variable pointing to the Java installation directory. I am installing on a fresh install of ubuntu 16.X and Java is not installed by default.
In order to Install Java we will need to SSH on to the box and install Java Via via apt.
To install Java on your ubuntu server follow these steps
Open a Terminal window , in my case from a ubuntu box
CTRL + ALT + T
Add a reference to the Oracle PPA then update your package repository
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
Install Oracle JDK 8
sudo apt-get install oracle-java8-installer
Check your Java Version
The version information returned should be similar too:
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
Install Database software
Team City is able to store TeamCity stores build history, users, build results and some run time data to a number of Relation Database Management Systems (RDBMS) including
- Postrgre SQL
- MS SQL
- Default Internal DB
In my particular case I make use of Postgres SQL, Install Postgres SQL on ubuntu
Never use internal HSQLDB database for production TeamCity instances.
Download & Install Team city
Download the latest TeamCity for linux from Jetbrains
## At the time of writing this article the latest version was 10.0.4
After the download completes unpack the file
tar -xzf TeamCity-10.0.4.tar.gz
We will install TeamCity to the
opt so we need to move the TeamCity Dirctory to
/opt/ and set permissions to the user running the TeamCity Applicaiton.
sudo mkdir /opt/JetBrains
sudo mv TeamCity /opt/JetBrains/TeamCity
sudo chown -R $user /opt/JetBrains/TeamCity # Insert Username for $User
Configure TeamCity to start automatically with the correct use by creating a script to start and stop TeamCity. We’ll create a simple bash script using the
nano text editor
sudo nano /etc/init.d/teamcity
If you are going to running the team city service under username other than the one you are currently installing it with then you will need to replace
$user in the code snippet with that username.
Copy and paste the following code into the editor or clone to gist from Github
Change the permissions required to execute the script and add it to the starup to ensure Team City is started whenever the the server is start/restart
sudo chmod +x /etc/init.d/teamcity
sudo update-rc.d teamcity defaults
Download database driver
The database drivers are usually not included in the TeamCity set up files. We will need to download the PostGres Driver seperately and place them in the
Change into the directory
Download the driver
We are now ready to start Team City and begin the configuratio in the Team City UI
sudo /etc/init.d/teamcity start
http://[Server name or IP]:8111 and verify that you see “TeamCity First Start” page.
Congratulations TeamCity is installed continue the steps on the web page to configure it.
Team City is a vary easy to use to and configure CI/CD (Continuous Integration/Continuous Deployment) platform. A Freemium license for up to 20 build configurations and 3 free Build Agent licenses is available.
It is possible to use Team City to build Microsoft .net core applications on a Linux Server and all that is required is the basic configuration. Once the basic configuration is complete you can move on to either configuring a Windows Build Agent or Configure Ubuntu headless server 16.x as TeamCity Build Agent to use Cake
A unique background as business owner, marketing, software development and business development ensures that he can offer the optimum business consultancy services across a wide spectrum of business challenges.
Latest posts by Gary Woodfine (see all)
- Happy 4th Blog Birthday – A blogging year in review - Dec 6, 2018
- Getting started with .NET Core and the Serverless Framework - Dec 3, 2018
- How to use the Abstract Factory design pattern in C# - Nov 18, 2018