PDA

View Full Version : TS2 Server Install Tutorial


PureGrain
12-01-2004, 16:14
TeamSpeak Linux Server Tutorial (http://www.hyper-gaming.com/pages.php?linkID=TeamSpeak/index.php) v2.0 by PureGrain

Finally I have decided to update this quite old tutorial. I hope this new version will help out even more than the old one did. I have been quite and did not mean to wait so long for this, so now it is here. Thanks to all of those who have given me credit and given my tutorial a look over. There may be an easier way or a fast way or even another way to do what I have listed, but this wayworks for me.

Enjoy!!

:D

*EDIT*
New flash version coming soon.

lestat325
05-03-2004, 22:07
thanks,

PureGrain
08-03-2004, 00:21
Your welcome. :)

guldi
08-03-2004, 13:16
made it sticky and removed some bumps :)

Bastian
08-03-2004, 14:49
BTW: This is the old server interface. The improved interface comes with the next server release that is supposed to come this week.

You can already see the new interface in the developer release b51, so I suggest you update your tutorial to fit the improved interface.

PureGrain
09-03-2004, 22:45
Originally posted by Ch'Ih-Yu
BTW: This is the old server interface. The improved interface comes with the next server release that is supposed to come this week.

You can already see the new interface in the developer release b51, so I suggest you update your tutorial to fit the improved interface.

I will re-make it when it is public released. Or I might just make a totaly new one, who knows. Thanks for the sticky.. It seems to help slow down so many threads from starting on this topic.

vs. Tear
13-03-2004, 06:52
Thank you very much for the tutorial. It worked flawlessly.

I request that you add a howto with instructions to make the server automatically start on boot.

pim
13-03-2004, 10:26
All in favour say "aye"

"aye"

[SNAFU]Banshee
13-03-2004, 17:00
thanks for this i was totaly stumped as how to do it, 1 more question, is there any that this can be automated, ie: server crashes or webhost dies for a few hours, can or is there some way for the server to be restarted?:confused:

PureGrain
18-03-2004, 00:31
My new tutorial is in the works now. I was awaiting the new release. I will be working on it over the coarse of the next few weeks and it will include several new options including Starting TeamSpeak on reboot or start up.

So bare with me, I am working on several projects at the same time and have very little extra time to do so. But I am working on it.

:D

[SNAFU]Banshee
11-04-2004, 10:45
thanks for the help and i will wait patiently, so whens it goona be ready hmmm :D

BaNDiT2477
22-04-2004, 08:05
is there a link to the old one?

TaLoN-cQe
07-06-2004, 16:49
Hi :confused:

Your link on your site has no tut ( page not found ) - can you help me please or anyone else for that matter.

I have a public linux server and wish to place TS on it, but i don't know where to start?

many thanks in advance :D

maggy
08-06-2004, 19:14
looks like you lost your domain name or somethin
i'd also like the instructions for running the server at startup

PureGrain
13-06-2004, 04:50
No I did not lose domain name, just had trouble with updating Name Servers. Took about 5 days to get it back to working again. Should be working fine again. If for some reason DNS is not working for you still.. Email me at This Link (puregrain@completronics.com).

:o

GOD
17-06-2004, 16:12
fix your db

Thetargos
19-06-2004, 08:39
Just a little advice on the compressed file handling...

You can avoid to have two steps to de-compress the tarball archive (tar.bz2) if you use simply the command tar suppliest to de-compress bzip2 files:


tar -jxvf <filename>.tar.bz2


I don't know other guys (Windows guys), but I find it easier to remember to use only one command instead of two to de-compress an archive ;)

And you could (o'course) use tab autocompletion (start typing the file name and press tab to have it completed).

About the rest, GREAT work!

IcyMidnight
30-08-2004, 06:48
Hi,

I was wonderring whether anyone else has ts set to run on startup, or if it will be added to PureGrain's tutorial.

Thanks

PureGrain
30-08-2004, 14:01
I have planned on making a new version of my tutorial, just have not had time. And yes the Startup will be added as well. For now, just search this forum, it is here somewhere.. I am on my way out the door or I would write it out now.. :P

Stiletto
02-09-2004, 05:48
Hi, I've got server space on a remote server, and I've extracted and installed, but I don't know what address I need to use in my browser to connect to the admin panel. Can anyone help me?
Thanks

IcyMidnight
05-09-2004, 10:21
Stiletto: FAQ -> Second one under tech support.

(And also in the manual that came with the server!)

http://www.goteamspeak.com/faq.php?faq=9

ScubaSteve21885
27-09-2004, 07:19
yeah i recently got SSH but heh i don't know exactly how to use the putty program... and then i don't know exactly where to upload the teamspeak server to in the ftp :/

ScubaSteve21885
28-09-2004, 03:11
ok so i followed your tutorial but it seems you left a step out.....

-jailshell-2.05b$ cd tss_rc2
-jailshell-2.05b$ ls
server_windows_service.exe ts2_server_rc2_20201.tar tss2_rc2
-jailshell-2.05b$ cd tss2_rce
-jailshell: cd: tss2_rce: No such file or directory
-jailshell-2.05b$ cd tss2_rc2
-jailshell-2.05b$ ls
INSTALL changelog.txt server.dbs sqlite.so
INSTALL.mysql httpdocs server.ini sqlite_sql
Manual libsqlmy.so server.log tcpquerydocs
README manual.html server.log.save teamspeak2-server_startscript
bad_names.txt mysql_sql server_linux tsserver2.pid
-jailshell-2.05b$ pico server.log

here is what i have gotten so far...i wrote down the passwords given to me but it seems it didn't give me an ip...when i use my own ip i get to the server administration...i type in the username and pass and it says login failed....

is there a way i can make it to where it says teamspeak.scoobweb.com as the server IP?

PureGrain
28-09-2004, 03:37
ok so i followed your tutorial but it seems you left a step out.....

-jailshell-2.05b$ cd tss_rc2
-jailshell-2.05b$ ls
server_windows_service.exe ts2_server_rc2_20201.tar tss2_rc2
-jailshell-2.05b$ cd tss2_rce
-jailshell: cd: tss2_rce: No such file or directory
-jailshell-2.05b$ cd tss2_rc2
-jailshell-2.05b$ ls
INSTALL changelog.txt server.dbs sqlite.so
INSTALL.mysql httpdocs server.ini sqlite_sql
Manual libsqlmy.so server.log tcpquerydocs
README manual.html server.log.save teamspeak2-server_startscript
bad_names.txt mysql_sql server_linux tsserver2.pid
-jailshell-2.05b$ pico server.log

here is what i have gotten so far...i wrote down the passwords given to me but it seems it didn't give me an ip...when i use my own ip i get to the server administration...i type in the username and pass and it says login failed....

is there a way i can make it to where it says teamspeak.scoobweb.com as the server IP?

Yeah, set up a subdomain on your domain name, make sure the dns records are inputed for it.

FloorPie
05-10-2004, 21:19
Is there any reason you're running it as root?

Ravenstone
22-11-2004, 18:35
For the WinSCP 3.7.1 file you have in the top of your tutorial here is an updated link for it. Your link in the tutorial is not active anymore.


http://winscp.sourceforge.net/eng/download.php

PureGrain
22-11-2004, 20:47
I decided to take down this tutorial and revamp it, it will be back up soon. Thanks for the info on the link and any other suggestions made in the forum.

PureGrain
21-03-2005, 01:00
v2.0 for this tutorial has been released today.

Linux Installation v2.0 (http://www.complevoice.com/linux_tutorial)

;)

Adariel
09-04-2005, 02:23
Trying to get to the tutorial ... having DNS trouble again? Keep getting a "Could not be found" error.

PureGrain
28-05-2005, 05:28
Sold my company and the other guys should be getting this back up soon. If not I will post it on my new company site soon.

[BBF]Jester
06-10-2005, 05:27
This is an init script I wrote for my clans server. It is setup to allow running multiple host instances as well. It works on CentOS3.3. Can not claim it will work on any others, but I see no reason it will not. I took bits and peices from a lot of places to get this working. I hope it saves someone a few hours of thier time.

#!/bin/bash
#
# teamspeak Starts Teamspeak server.
#
# Date: 9/24/2005
# Author: [BBF]Jester
# Note: I do not and will not provide support for this script. It is as-is and with out any warranty what so ever.
# It is also source material from various scripts found on this site.
# Magic Power, HomeBrew, and others I am sure. I unfortunatly did not keep track of who I was taking my bits and peices from.
# I appologize to those that I missed.
#
# description: Teamspeak is a quality, scalable application which \
# enables people to speak with one another over the Internet.
#
#Create a user on the server.
#Copy the TS install to a common location. (eg /usr/share/tss2_rc2)
#Enter the username you just created below and adjust the tsserver var to be where you copied TS to.
# Copy this script to your init.d folder. chmod it to 755 and run
# Add the symlinks in the rc.x folders. I did 0,1,2,6 at 11 and 3,4,5 at 91.
# This script was written for CentOS3.3. I see no reason why it would not work on all systems with init.d systems.

# Source function library.
. /etc/init.d/functions

#config
tsuser=<enter TS username here>
tsserver=/usr/share/tss2_rc2/server_linux
rundir=/home/$tsuser/ts

piddir=$rundir
pidname=$tsuser.pid

logdir=/var/log
logname=$tsuser.log

dbdir=$rundir
dbname=server.dbs

inidir=$rundir
ininame=server.ini

badnamesdir=$rundir
badnamesname=bad_names.txt


tsstart() {
echo -n "Starting $tsuser TeamSpeak server:"
if [ -e "$piddir/$pidname" ]; then
echo -n "$pidname already exists...Is the server already running?";
echo -n "If you are sure the server is not running, delete $piddir/$pidname"
exit 1
else
if [ -e "$tsserver" ]; then
sudo -u $tsuser $tsserver -PID=$piddir/$pidname -log=$logdir/$logname -db=$dbdir/$dbname -ini=$inidir/$ininame -badnames=$badnamesdir/$badnamesname &> /dev/null
else
echo -n "Couldn't find $tsserver"
exit 5
fi
fi
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$tsuser && success || failure
echo
return $RETVAL
}

tsstop(){
if [ -e "$piddir/$pidname" ]; then
echo -n "Stopping $tsuser TeamSpeak server."
if ( kill -TERM `cat $piddir/$pidname` ); then
for c in $(seq 1 300); do
if [ -e "$piddir/$pidname" ]; then
echo -n "."
sleep 1
fi
done
fi
if [ -e "$piddir/$pidname" ]; then
echo -n "The server does not shutdown properly - killing stray processes."
kill -KILL `cat $piddir/%pidname`
rm $piddir/$pidname
sleep 5
else
echo -n "done"
fi
else
echo -n "$pidname is missing. There is no server to stop."
exit 7
fi
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$tsuser && success || failure
echo
return $RETVAL
}

tsrestart() {
tsstop
tsstart
}

tsstatus() {
if [ -e "$piddir/$pidname" ]; then
printf "The server seems to be running. \n"
exit 0
else
printf "The server seems to be stopped. \n"
exit 3
fi
}

case "$1" in
start)
tsstart
;;
stop)
tsstop
;;
restart|reload)
tsrestart
;;
status)
tsstatus
;;
*)
echo $"Usage: $0 {start|stop|restart|status}"
exit 1
esac

berky2755
14-01-2006, 19:57
Jester']This is an init script I wrote for my clans server. It is setup to allow running multiple host instances as well. It works on CentOS3.3. Can not claim it will work on any others, but I see no reason it will not. I took bits and peices from a lot of places to get this working. I hope it saves someone a few hours of thier time.




thanks jester! I didn't get a chance to try this yet, but this is exactly what i've been searching for. :)

berky2755
19-02-2006, 20:07
I have edited Jester's script for my own use, and figured someone else might want to use it or modify it to make it even better :)

First of all, I used the tutorial created here: http://forum.goteamspeak.com/showthread.php?t=15438

I only have 1 user that was created simply to start this server, and that is it. Secondly, the only reason i modified the script in the first place was because Jester's script worked fine, as long as the server never crashed. If the TS server had been killed not using the script, it would not start on bootup. Therefore, the only real editing I did was to hvae it check the output of 'ps aux' (using Fedora Core 4 as my OS; other linux OS's sometimes use ps -ef) to make sure that the process wasn't actually running.

That said, here it is for anyone who wants to use it, modify it, laugh at it, etc.


#!/bin/bash
#
# teamspeak Starts Teamspeak server.
#
# Date: 9/24/2005
# Author: [BBF]Jester
# Note: I do not and will not provide support for this script. It is as-is and with out any warranty what so ever.
# It is also source material from various scripts found on this site.
# Magic Power, HomeBrew, and others I am sure. I unfortunatly did not keep track of who I was taking my bits and peices from.
# I appologize to those that I missed.
#
# description: Teamspeak is a quality, scalable application which \
# enables people to speak with one another over the Internet.
#
#Create a user on the server.
#Copy the TS install to a common location. (eg /usr/share/tss2_rc2)
#Enter the username you just created below and adjust the tsserver var to be where you copied TS to.
# Copy this script to your init.d folder. chmod it to 755 and run
# Add the symlinks in the rc.x folders. I did 0,1,2,6 at 11 and 3,4,5 at 91.
# This script was written for CentOS3.3. I see no reason why it would not work on all systems with init.d systems.

# Source function library.
. /etc/init.d/functions

#config
tsuser=!!!!!!!!!!!<user goes here>!!!!!!!!!!
tsexec=server_linux
rundir=/home/$tsuser/tss2_rc2
tsserver=$rundir/$tsexec

piddir=$rundir
pidname=$tsuser.pid

logdir=/var/log
logname=$tsuser.log

dbdir=$rundir
dbname=server.dbs

inidir=$rundir
ininame=server.ini

badnamesdir=$rundir
badnamesname=bad_names.txt

tsprocs=`ps aux | grep "$tsexec" | grep -v "grep" | awk -F" " '{ print $2 }'`
if [ -e "$piddir/pidname" ]; then
tspid=`cat $piddir/$pidname`
else
tspid="0"
fi

tsstart() {
echo -n "Starting TeamSpeak server:"
# If $tsexec shows up as running more than once, find the real pid (which should be the first in the list)
for procid in $tsprocs
do
if [ "$procid" -eq "$tspid" ]; then
tsproc=$procid
break
fi
done
if [ -n "$tsproc" ] && [ $tsproc != "" ] && [ "$tsproc" -eq "$tspid" ]; then
echo -n "Process is running with pid $tsproc, exiting script..."
exit 1
fi
if [ -e "$piddir/$pidname" ]; then
echo -n "$pidname exists, but server not running. Deleting $piddir/$pidname and starting server..."
rm -f $piddir/$pidname
fi
if [ -e "$tsserver" ]; then
sudo -u $tsuser $tsserver -PID=$piddir/$pidname -log=$logdir/$logname -db=$dbdir/$dbname -ini=$inidir/$ininame -badnames=$badnamesdir/$badnamesname &> /dev/null
else
echo -n "Couldn't find $tsserver"
exit 5
fi
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$tsuser && success || failure
echo
return $RETVAL
}

tsstop(){
if [ -e "$piddir/$pidname" ]; then
echo -n "Stopping $tsuser TeamSpeak server."
if ( kill -TERM `cat $piddir/$pidname` ); then
for c in $(seq 1 300); do
if [ -e "$piddir/$pidname" ]; then
echo -n "."
sleep 1
fi
done
fi
if [ -e "$piddir/$pidname" ]; then
echo -n "The server does not shutdown properly - killing stray processes."
kill -KILL `cat $piddir/%pidname`
rm $piddir/$pidname
sleep 5
else
echo -n "done"
fi
else
echo -n "$pidname is missing. There is no server to stop."
exit 7
fi
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$tsuser && success || failure
echo
return $RETVAL
}

tsrestart() {
tsstop
tsstart
}

tsstatus() {
if [ -e "$piddir/$pidname" ]; then
printf "The server seems to be running. \n"
exit 0
else
printf "The server seems to be stopped. \n"
exit 3
fi
}

case "$1" in
start)
tsstart
;;
stop)
tsstop
;;
restart|reload)
tsrestart
;;
status)
tsstatus
;;
*)
echo $"Usage: $0 {start|stop|restart|status}"
exit 1
esac

scaraber
18-03-2006, 12:02
hello
I have read the tuto and I have a problem with my server.
he don't want to start
the Konsole says this when I start it

starting the teamspeak2 server
Error, Either an old instance of teamspeak is still running, or
an other application is using the tcpquery port!
Error, Server was not started!

I have madriva
What I must do ?
I don't understand because i dont have other ap who are run ....
pls help me
by
scaraber

etr
19-03-2006, 01:08
scaraber,

The reason the server isn't starting is that the PID file is still out there.

The script that starts the server tells it write a PID file (tsserver.pid) to indicate that it is running and to help the script stop the server later. Whenever you start the server, the script first checks to be sure that it isn't already running by checking for the PID file. If the script finds the PID file, it asssumes that the server is running and won't start it.

The script deletes the PID file when you stop the server so that you can later re-start it again. This works well most of the time, but sometimes the server stops under irregular circumstances, like power outages. When this happens, the PID file does not get deleted. The resolution to this is the delete the PID (tsserver.pid) file yourself.

To address the power outage scenario, I added a line at the bottom of my rc.sysinit script to check for the PID file and delete it during the boot process.

Now, I just need to figure out how to get SELinux to play nicely with the su command I use to launch the server in my start script...

scaraber
19-03-2006, 09:13
thx for your awnser.
but I don't have understand all I have linux for 2 two days only.
I have ann question what server I must be use the binary or the other because I dont have the same file of the tutorial..


bad_names.txt INSTALL Manual README server_linux sqlite_sql
changelog.txt INSTALL.mysql manual.html server.dbs server.log tcpquerydocs
httpdocs libsqlmy.so mysql_sql server.ini sqlite.so teamspeak2-server_startscript

edit
It is ok the server start I don't know why he dont wnat yesterday....

by
scaraber

yago_potato
09-02-2008, 02:23
this was done on ubuntu server edition 7.04 also worked on 7.10 just follow the links directions, and i was all the way updated at the time!
http://yago.csgamestats.com/yago/ubuntu%20server%20linux.txt

yago_potato
10-03-2008, 06:46
i would like to know if this works for other people also! :confused:

kdw´s
12-03-2008, 14:33
I tried to use berky2755's script on my ubuntu dapper system but it didn't work. There were some minor errors due to the different distribution.

First of all, ubuntu doesn't know the 'Source function library'. Second, the following lines contained unknown commands:

RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$tsuser && success || failure
echo
return $RETVAL

Both errors could be solved by removing that lines.

I installed tss to /usr/shared/tss2_rc2 and created a user tss for running tss. Feel free change..

Finally here's my version of /etc/init.d/tss

#!/bin/bash
#
# teamspeak Starts Teamspeak server.
#
# Date: 03/12/2008
# Author: [BBF]Jester, berky2755, kdw's
# Note: I do not and will not provide support for this script. It is as-is and with out any warranty what so ever.
# It is also source material from various scripts found on this site.
# Magic Power, HomeBrew, and others I am sure. I unfortunatly did not keep track of who I was taking my bits and peices f$
# I appologize to those that I missed.
#
# description: Teamspeak is a quality, scalable application which \
# enables people to speak with one another over the Internet.
#
#Create a user on the server.
#Copy the TS install to a common location. (eg /usr/share/tss2_rc2)
#Enter the username you just created below and adjust the tsserver var to be where you copied TS to.
# Copy this script to your init.d folder. chmod it to 755 and run
# Add the symlinks in the rc.x folders. I did 0,1,2,6 at 11 and 3,4,5 at 91.
# This script was written for CentOS3.3. I see no reason why it would not work on all systems with init.d systems.


#config
tsuser=tss
tsexec=server_linux
rundir=/usr/share/tss2_rc2
tsserver=$rundir/$tsexec

piddir=$rundir
pidname=$tsuser.pid

logdir=/var/log
logname=$tsuser.log

dbdir=$rundir
dbname=server.dbs

inidir=$rundir
ininame=server.ini

badnamesdir=$rundir
badnamesname=bad_names.txt

tsprocs=`ps aux | grep "$tsexec" | grep -v "grep" | awk -F" " '{ print $2 }'`
if [ -e "$piddir/pidname" ]; then
tspid=`cat $piddir/$pidname`
else
tspid="0"
fi

tsstart() {
echo -n "Starting TeamSpeak server:"
# If $tsexec shows up as running more than once, find the real pid (which should be the first in the list)
for procid in $tsprocs
do
if [ "$procid" -eq "$tspid" ]; then
tsproc=$procid
break
fi
done
if [ -n "$tsproc" ] && [ $tsproc != "" ] && [ "$tsproc" -eq "$tspid" ]; then
echo -n "Process is running with pid $tsproc, exiting script..."
exit 1
fi
if [ -e "$piddir/$pidname" ]; then
echo -n "$pidname exists, but server not running. Deleting $piddir/$pidname and starting server..."
rm -f $piddir/$pidname
fi
if [ -e "$tsserver" ]; then
sudo -u $tsuser $tsserver -PID=$piddir/$pidname -log=$logdir/$logname -db=$dbdir/$dbname -ini=$inidir/$inin$
echo " Done."
else
echo -n "Couldn't find $tsserver"
exit 5
fi
echo
}

tsstop(){
if [ -e "$piddir/$pidname" ]; then
echo -n "Stopping $tsuser TeamSpeak server."
if ( kill -TERM `cat $piddir/$pidname` ); then
for c in $(seq 1 300); do
if [ -e "$piddir/$pidname" ]; then
echo -n "."
sleep 1
fi
done
fi
if [ -e "$piddir/$pidname" ]; then
echo -n "The server does not shutdown properly - killing stray processes."
kill -KILL `cat $piddir/%pidname`
rm $piddir/$pidname
sleep 5
else
echo -n "done"
fi
else
echo -n "$pidname is missing. There is no server to stop."
exit 7
fi
echo
echo
}

tsrestart() {
tsstop
tsstart
}

tsstatus() {
if [ -e "$piddir/$pidname" ]; then
printf "The server seems to be running. \n"
exit 0
else
printf "The server seems to be stopped. \n"
exit 3
fi
}

case "$1" in

start)
tsstart
;;
stop)
tsstop
;;
restart|reload)
tsrestart
;;
status)
tsstatus
;;
*)
echo $"Usage: $0 {start|stop|restart|status}"
exit 1
esac

kdw´s
12-03-2008, 20:04
I finally did some more edits to get the typical ubuntu start-script output

here it is..

Katana*GFR*
12-03-2008, 20:51
kdw, would this work in CentOs also? Im using version 5.x
Looking for somethign like this so the server gets booted automaticly..

benbur
31-03-2008, 03:33
TeamSpeak Linux Server Tutorial (http://www.hyper-gaming.com/pages.php?linkID=TeamSpeak/index.php) v2.0 by PureGrain

Finally I have decided to update this quite old tutorial. I hope this new version will help out even more than the old one did. I have been quite and did not mean to wait so long for this, so now it is here. Thanks to all of those who have given me credit and given my tutorial a look over. There may be an easier way or a fast way or even another way to do what I have listed, but this wayworks for me.

Enjoy!!

:D

*EDIT*
New flash version coming soon.

It's not a good link anymore. Ad site.

kaanozbek
10-01-2009, 21:58
Hi all. I registered domain and hosting. I have a host on Linux Server. But did'nt install Teamspeak 2 Server Linux. Help me please.

My messenger adress: jurkozbek***********

Thank you...

microAlexx
12-06-2009, 23:02
For all ubuntu user who want to install TS :

sudo apt-get install teamspeak-server

default password here : /etc/teamspeak-server/passwords
server.ini : /etc/teamspeak-server/server.ini

sudo /etc/init.d/teamspeak-server
Usage: /etc/init.d/teamspeak-server {start|stop|status|restart|force-reload}