TeamCity is a Continuous Integration (CI) and Continuous Delivery (CD) server offered by
JetBrains.
Glossary
Installation
Ubuntu 18.04 LTS
- Install OpenJDK 8.
apt-get update
apt-get install openjdk-8-jdk
- Install PostgreSQL.
apt-get install postgresql postgresql-contrib
- Login to the postgres account and login to the PostgreSQL database.
su postgres
psql
- Create the teamcity user and associated database. Exit psql and the postgres user when finished.
CREATE USER teamcity WITH PASSWORD '-PASSWORDHERE-';
CREATE DATABASE teamcity OWNER teamcity;
\q
exit
- Download the tar.gz installer from the JetBrains Website. Be sure to replace the wget URL with the latest direct download link.
wget https://download.jetbrains.com/teamcity/TeamCity-2019.1.3.tar.gz
- Extract the tar.gz into the /opt directory.
tar -xvzf TeamCity-2019.1.3.tar.gz -C /opt
- Create the teamcity user and home directory.
useradd teamcity
mkdir /home/teamcity
- Disable logging in for the teamcity user.
usermod --shell /usr/sbin/nologin teamcity
- Change ownership of the TeamCity directory to the teamcity user.
chown -R teamcity:teamcity /opt/TeamCity
- Enter the following config into /etc/systemd/system/teamcity-server.service:
[Unit]
Description=JetBrains TeamCity Server
Requires=network.target
After=syslog.target network.target
[Service]
Type=simple
ExecStart=/opt/TeamCity/bin/teamcity-server.sh run
ExecStop=/opt/TeamCity/bin/teamcity-server.sh stop
User=teamcity
[Install]
WantedBy=multi-user.target
- Enable the TeamCity Server service.
systemctl enable teamcity-server
- Start the TeamCity Server service.
systemctl start teamcity-server
- Navigate to port 8111 on the server in a web browser. When prompted, select PostgreSQL as the database type and enter the previously created PostgreSQL user information.