Today I will spend some time trying to install TeamCity on Ubuntu 16.04 VPS.
First download TeamCity server file. Do not use the link above, instead get the latest link by navigating to
Unzip (your filename will be different)
tar xvzf TeamCity-2018.2.3.tar.gz
Java is required to run TeamCity, to check what version is currently running
If you need to install Java like I did follow this website https://www.linode.com/docs/development/java/install-java-on-ubuntu-16-04/
I’m going to use the default configuration and press the start button and see what happens. First I had to give myself permission to run the scripts
cd /TeamCity/bin chmod 711 teamcity-server.bat chmod 711 runAll.bat
And to run
Now when I navigate to <URL>:8111 I see a TeamCity configuration page.
I chose to use MySql and for that all I had to do what create a database for TeamCity
-p CREATE DATABASE teamcity;
If you get a JDBC driver missing error you will need to do the following:
sudo apt-get install libmysql-java echo "# Set classpath for JDBC & MySQLCLASSPATH=\".:/usr/share/java/mysql.jar\"" >> /etc/environment
When I selected MySql it complained about not having a mysql jdbc driver. I had to create the following folders: ‘.BuildServer/lib/jdbc/’. Download mysql connector jar and copy to ‘.BuildServer/lib/jdbc/mysql-connector-java-<version>.jar’.
‘.BuildServer’ is the default data directory but you can set it to any path. Make sure it is secure!
And make sure you copy the jar to /TeamCity/lib/ as well (obviously).
When you have TeamCity server fired up, it will ask for a super token. You can find this by opening ‘TeamCity/logs/team-server.log. To search with vim press ‘?’ and type ‘Super user authentication token’ (obviously).
Voila! TeamCity is up and running