1 step: create a new user
login via ssh to your debian server and create a new user for your teamspeak 3 server.
choose whatever password you want.
now we need to create a new folder for your serverfiles and and change the owner of the folder
create folder:
Code:
mkdir /home/ts3server
change owner:
Code:
chown ts3server /home/ts3server
after that login as ts3server
2 step: download server files
download the latest linux server files from here: http://www.teamspeak.com/?page=downloads
depending on if you are using x86 or a x64 linux server, you have to choose the right teamspeak server
Code:
cd /home/ts3server
wget http://dl.4players.de/ts/releases/3.0.10.3/teamspeak3-server_linux-amd64-3.0.10.3.tar.gz
3 step: installing the server
as soon your download is finished, you need to unzip all server files with this command:
Code:
tar -xzvf teamspeak3-server_linux*.tar.gz
enter the folder with this command:
Code:
cd teamspeak3-server_linux-amd64-3.0.10.3
move everything inside the folder to the upper folder with this command:
now we are going to start the server for the first time:
Code:
./teamspeak3-server_linux-amd64/ts3server_minimal_runscript.sh
you should see this informations now and write them down
your server is ready to run.
- - - Updated - - -
now that you have a working teamspeak 3 server, you want it to start automatically as soon as your server gets started too.
create a new file under /etc/init.d and call it simply ts3server:
Code:
nano /etc/init.d/ts3server
and copy paste this autostart script in it
Code:
#!/bin/sh
### BEGIN INIT INFO
# Provides: teamspeak3
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Teamspeak 3 Server
### END INIT INFO
# INIT Script by www.SysADMINsLife.com
######################################
# Customize values for your needs: "User"; "DIR"
USER="teamspeak3"
DIR="/home/ts3server/teamspeak3-server_linux-amd64"
###### Teamspeak 3 server start/stop script ######
case "$1" in
start)
su $USER -c "${DIR}/ts3server_startscript.sh start"
;;
stop)
su $USER -c "${DIR}/ts3server_startscript.sh stop"
;;
restart)
su $USER -c "${DIR}/ts3server_startscript.sh restart"
;;
status)
su $USER -c "${DIR}/ts3server_startscript.sh status"
;;
*)
echo "Usage: {start|stop|restart|status}" >&2
exit 1
;;
esac
exit 0
set permissions for this new file
Code:
chmod +x /etc/init.d/ts3server
and now update it for autostart
Code:
update-rc.d ts3server defaults
now everytime your linux server gets restartad for whatever reason, your teamspeak server will autostart.
some commands for your server:
teamspeak start
Code:
/etc/init.d/ts3server start
teamspeak stop
Code:
/etc/init.d/ts3server stop
teamspeak restart
Code:
/etc/init.d/ts3server restart
teamspeak status
Code:
/etc/init.d/ts3server status