Install Teamspeak 3 Server on Linux

From Bonus Bits Wiki
Jump to: navigation, search

Contents

Purpose

This article explains the basics for installing Teamspeak 3 on Linux. In this example I used CentOS 6.6.


Create User

useradd teamspeak


Create Install Directory

mkdir /opt/teamspeak3


Download Teamspeak3 Server

http://www.teamspeak.com/?page=downloads


Extract

tar -zxvf teamspeak3-server_linux-x86-3.0.0-rc1.tar.gz --strip-components 1 -C /opt/teamspeak3/
chown -R teamspeak:teamspeak /opt/teamspeak3


Run Server Start Script

Run the server start script for the first time manually so you can get the admin token. It will not be shown again. If you miss this, delete everything and start over.

su teamspeak -c "/opt/teamspeak3/ts3server_startscript.sh start"


Copy Admin Token

 ------------------------------------------------------------------
                        I M P O R T A N T                           
  ------------------------------------------------------------------
               Server Query Admin Acccount created                 
           loginname= "serveradmin", password= "fDprQFjv"
  ------------------------------------------------------------------
   
   
  ------------------------------------------------------------------
                        I M P O R T A N T                           
  ------------------------------------------------------------------
        ServerAdmin privilege key created, please use it to gain 
        serveradmin rights for your virtualserver. please
        also check the doc/token_guide.txt for details.
  
         token=Drp5gFCr80GGFUfWrDSnun8Ugfq9+lblZ6x1aMHW
  ------------------------------------------------------------------


Connect with Client

  1. Install Teamspeak 3 Client on a system
    1. http://www.teamspeak.com/?page=downloads
  2. Connect to the server IP address
  3. Make yourself the admin with the server admin token key
    1. Permissions | Use Privilege Key


Setup Automatic Launch on Boot

Create Launcher File

vim /etc/init.d/teamspeak3

Paste this script into the file:

#!/bin/bash
#
# teamspeak3 Start/Stop/Restart Teamspeak service
#
# chkconfig: 2345 98 8
# description: Start/Stop/Restart the Teamspeak voice server
# install: chkconfig --add teamspeak3
# uninstall: chkconfig --del teamspeak3
# author: Tig (wowsin.org)

# Location of the 'su' command
su=/bin/su
# Username of the teamspeak3 user
user=teamspeak
# or relative (meaning if your directory is in the home directory of ts and is called ts3
# then you just need ts3, as is the default.
dir=/opt/teamspeak3
# The start script (I use the current default
exec=./ts3server_startscript.sh

# See how we were called.
case "$1" in
start)
$su - $user -c "cd $dir;$exec start"
;;
stop)
$su - $user -c "cd $dir;$exec stop"
;;
restart)
$su - $user -c "cd $dir;$exec restart"
;;
status)
$su - $user -c "cd $dir;$exec status"
;;
*)
echo $"Usage: $0 {start|stop|restart|status}"
exit 2
esac
exit 0 


Change Permissions

chmod 0755 /etc/init.d/teamspeak3


Add Launch File to Chkconfig

chkconfig --add teamspeak3


Restart Server

service teamspeak3 restart


Migrating from one Server to another (Same Version)

If migrating then now copy all the files from the old server over top. This even works if going from Windows to Linux. You can dump the .txt, .dll and .exe files. be sure to check file permissions and ownership.


Sources