Skip to content

Instantly share code, notes, and snippets.

@maxivak
Last active May 1, 2021 13:54
Show Gist options
  • Save maxivak/b884b020e0dcd2aaabd4 to your computer and use it in GitHub Desktop.
Save maxivak/b884b020e0dcd2aaabd4 to your computer and use it in GitHub Desktop.
Teamcity install on Centos

Teamcity install on Centos

yum install java-openjdk
yum install mysql-connector-java
cd /var/www/temp
download from - http://dev.mysql.com/downloads/connector/j
tar xpf mysql-connector-java-5.1.33.tar.gz
cp mysql-connector-java-5.1.33/mysql-connector-java-5.1.33-bin.jar /home/YOUR_USER/.BuildServer/lib/jdbc
# as user
cd /var/www/apps
mkdir teamcity
cd teamcity
wget http://download.jetbrains.com/teamcity/TeamCity-8.1.5.tar.gz
tar xpf TeamCity-8.1.5.tar.gz
/var/www/apps/teamcity/TeamCity/bin/runAll.sh start
in browser:
http://yousite.com:8111/mnt
#!/bin/bash
### BEGIN INIT INFO
# Provides: teamcity
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: TeamCity
# Description: TeamCity
### END INIT INFO
# Source function library.
. /etc/rc.d/init.d/functions
TEAMCITY_USER=YOUR_USER
TEAMCITY_DIR=/var/www/apps/teamcity/TeamCity
TEAMCITY_PATH=$TEAMCITY_DIR/bin/runAll.sh
#TEAMCITY_DATA_DIR=$TEAMCITY_DIR/.BuildServer
TEAMCITY_DATA_DIR=/home/YOUR_USER/.BuildServer
case $1 in
start)
su - $TEAMCITY_USER -c "TEAMCITY_DATA_PATH=$TEAMCITY_DATA_DIR $TEAMCITY_PATH start"
;;
stop)
su - $TEAMCITY_USER -c "TEAMCITY_DATA_PATH=$TEAMCITY_DATA_DIR $TEAMCITY_PATH stop"
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
exit 0
chmod +x /etc/init.d/teamcity
chkconfig --add teamcity
# or chkconfig teamcity on
service teamcity start
@integrii
Copy link

Thanks. Init script was helpful.

@fredmj
Copy link

fredmj commented Feb 15, 2018

Really useful. Thx.
Maybe something about the firewalld-cmd for the port and/or for the iptables rules

# firewall-cmd --zone=public --permanent --add-port=8111/tcp
# firewall-cmd  --reload

@audiebant
Copy link

@fredmj thanks , it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment