Results 1 to 15 of 46
-
30-06-2012, 19:12 #1
-= TeamSpeak Addict =-
- Join Date
- Oct 2010
- Location
- Warsaw / Poland
- Posts
- 234
[TUTORIAL] Teamspeak3 Server w/ MySQL Databse on Debian/Ubuntu
Hey. This tutorial will teach you how to set up a Teamspeak3 Server on your latest Debian/Ubuntu based distro. I've seen so many problems here using ts3 server on mysql (and so I had them as well in the past), and that's the reason why I'm writing this tutorial right now
. Today it's 30.06.2012 and it works just fine on my both servers - Debian 7.0 (Wheezy) and Ubuntu 12.04 (Precise), both running MySQL Server 5.5.24. It'll work as well with previous Debian/Ubuntu releases (such as squeeze, lucid lynx etc.) and MySQL Servers 5.1.*/5.0.*. Also it should work with further releases but I can't be 100% sure as for now.
Okey, let's get it started. Firstly... Why teamspeak3 server doesn't work with mysql at all?
Teamspeak3 server (Version 3.0.6.1) uses outdated libmysqlclient15 package, which isn't available in latest linux distros because it has been replaced with libmysqlclient16. I don't know why teamspeak3 haven't updated it to 16 yet, leaving some compatibilities with 15 but that's not a purpose of this tutorial.
I'll use server terminal for all such commands. You should execute them from local server terminal or SSH connection such as OpenSSH server.
I'll use bold font for commands, red bolded font for informations that needs edit to your preferences and orange bolded font for temporary things such as download address.
Firstly we need to download latest server package for linux from here, remember that it needs to match your server architecture - use i386 (x86) for 32-bit and amd64 for 64-bit. Also it would be cool to start teamspeak process as another user, just for server security. So... let's do it.
In last command you can use your favourite text editor, I used nano.Code:root@archi:~# adduser teamspeak root@archi:~# su teamspeak teamspeak@archi:/root$ cd ~ teamspeak@archi:~$ wget http://teamspeak.gameserver.gamed.de/ts3/releases/3.0.6.1/teamspeak3-server_linux-amd64-3.0.6.1.tar.gz teamspeak@archi:~$ tar xvf teamspeak3-server_linux-amd64-3.0.6.1.tar.gz teamspeak@archi:~$ mv teamspeak3-server_linux-amd64 teamspeak teamspeak@archi:~$ cd teamspeak teamspeak@archi:~/teamspeak$ chmod +X ts3server_linux_amd64 teamspeak@archi:~/teamspeak$ chmod +X ts3server_minimal_runscript.sh teamspeak@archi:~/teamspeak$ nano ts3server.ini
Now paste below text to your text editor and save it as ts3server.ini.
You can edit red bolded text to your preferences.
Okey. Now we need mysql-server on our machine. If you already have MySQL server on other machine and you want to use it instead - skip this part and remember to change host and port in ts3db_mysql.ini. As part of this tutorial we'll set up local mysql server.machine_id=
default_voice_port=9987
voice_ip=0.0.0.0
liscensepath=
filetransfer_port=30033
filetransfer_ip=0.0.0.0
query_port=10011
query_ip=0.0.0.0
dbplugin=ts3db_mysql
dbpluginparameter=ts3db_mysql.ini
dbsqlpath=sql/
dbsqlcreatepath=create_mysql/
logpath=logs
logquerycommands=0
You'll be prompted for root password for MySQL server. This is NOT a password for your teamspeak mysql connection. We'll use non-root mysql account for teamspeak.Code:teamspeak@archi:~/teamspeak$ su root root@archi:/home/teamspeak/teamspeak# cd ~ root@archi:~# apt-get update && apt-get install mysql-server
Okay, MySQL Server should be running. Next...
Code:root@archi:~# mysql -h localhost -u root -p mysql> create database teamspeak; mysql> grant ALL on teamspeak.* to teamspeak@localhost identified by 'your_password_for_mysql_connection'; mysql> exit
Let's continue...
Now paste below text to your text editor and save it as ts3db_mysql.ini.Code:root@archi:~# su teamspeak teamspeak@archi:/root$ cd ~/teamspeak teamspeak@archi:~/teamspeak$ nano ts3db_mysql.ini
Okay. We're nearly ready to go. Last (and probably hardest) part is to set up right libraries for teamspeak. Firstly let's check actual status...[config]
host=127.0.0.1
port=3306
username=teamspeak
password=your_password_for_mysql_connection
database=teamspeak
socket=
You should get similar output:Code:teamspeak@archi:~/teamspeak$ ldd libts3db_mysql.so
As we can see it's missing libmysqlclient15 library. There are 2 ways to fix it. First one is just copying this library from older linux distros and paste it and second way is just to install missing package. We'll use second way because it's much easier.linux-vdso.so.1 => (0x00007fff8a7c8000)
libmysqlclient.so.15 => not found
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f091a950000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f091a6cd000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f091a4b7000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f091a130000)
/lib64/ld-linux-x86-64.so.2 (0x00007f091ae65000)
Package is named libmysqlclient15off and it's unavailable to install for latest distros. We need to download and install it manualy.
There are 2 main versions of this package. Ubuntu version and Debian version. For some reason Ubuntu version of libmysqlclient15off works much better on my both machines - ubuntu and debian. I'll attach working links:
Warning! libmysqlclient15off needs installed package mysql-common. If you have working MySQL Server on your machine it has been installed automatically. If you have remote MySQL Server install it using apt-get install mysql-common running as root.Ubuntu Hardy [5.0.96] (i386) - http://security.ubuntu.com/ubuntu/po...untu3_i386.deb
Ubuntu Hardy [5.0.96] (amd64) - http://security.ubuntu.com/ubuntu/po...ntu3_amd64.deb
Debian Lenny [5.0.51a] (i386) - http://archive.debian.org/debian/poo...enny5_i386.deb
Debian Lenny [5.0.51a] (amd64) - http://archive.debian.org/debian/poo...nny5_amd64.deb
If for some reason Ubuntu's version won't work for you just install Debian's one. I'll install Ubuntu's amd64 version for my machine:
And that's it! We've installed missing library for teamspeak. Let's check if everything works fine:Code:teamspeak@archi:~/teamspeak$ su root root@archi:/home/teamspeak/teamspeak# cd ~ root@archi:~# wget http://security.ubuntu.com/ubuntu/pool/main/m/mysql-dfsg-5.0/libmysqlclient15off_5.0.96-0ubuntu3_amd64.deb root@archi:~# dpkg -i libmysqlclient15off_5.0.96-0ubuntu3_amd64.deb
Output:Code:root@archi:~# su teamspeak teamspeak@archi:/root$ cd ~/teamspeak teamspeak@archi:~/teamspeak$ ldd libts3db_mysql.so
Yep, It works just fine.linux-vdso.so.1 => (0x00007fff4b5f1000)
libmysqlclient.so.15 => /usr/lib/libmysqlclient.so.15 (0x00007f27ece0b000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f27ecb04000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f27ec881000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f27ec66b000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f27ec2e4000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f27ec0c7000)
libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f27ebe90000)
libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007f27ebc78000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f27eba60000)
This step is optional. You don't need screen software to run TeamSpeak but it can help you out if you like to have things running in seperate windows like myself. Screen is useful when we're leaving our server in a background. If you wish to attach to the output just type screen -r as user teamspeak. If you want to deattach it just hit CTRL+A+D.
Code:teamspeak@archi:~/teamspeak$ su root root@archi:/home/teamspeak/teamspeak# apt-get install screen
And let's turn on our server...
If you didn't install screen use this command:Code:root@archi:/home/teamspeak/teamspeak# cd ~ root@archi:~# su teamspeak -c 'screen -d -m -S ts3 /home/teamspeak/teamspeak/ts3server_minimal_runscript.sh inifile=ts3server.ini'
Code:root@archi:/home/teamspeak/teamspeak# cd ~ root@archi:~# su teamspeak -c '/home/teamspeak/teamspeak/ts3server_minimal_runscript.sh inifile=ts3server.ini'
And that's it. Your Teamspeak3 server should be working.
EXTRA: How to start teamspeak server after reboot automatically
There are much ways to do it. I'll tell you a simplest one. Just execute nano /etc/rc.local as root and before "exit 0" type:
Or without screen:sleep 2
su teamspeak -c 'screen -d -m -S ts3 /home/teamspeak/teamspeak/ts3server_minimal_runscript.sh inifile=ts3server.ini'
Sleep is "just in case" if TeamSpeak server will start before MySQL Server.sleep 2
su teamspeak -c '/home/teamspeak/teamspeak/ts3server_minimal_runscript.sh inifile=ts3server.ini'
I hope that this tutorial was useful for you. If you have any questions or need more tips just give me a call. Thank you for reading.
TROUBLESHOOTING:
Q: What ports are needed?
A: I'll list every needed port:
9987/UDP - INPUT/OUTPUT (voice)
10011/TCP - INPUT/OUTPUT (serverquery)
30033/TCP - INPUT/OUTPUT (ftp)
2008/TCP - OUTPUT (licensecheck)
Additional used for above configuration:
3306/TCP - OUTPUT (Only if you're running local MySQL server, if you have remote MySQL server just make sure you can connect to it).
Remember that only INPUT ports should be forwarded f.e. in your router or firewall. OUTPUT ports are forwarded automatically on most configurations. So it'll be 9987/udp, 10011/tcp and 30033/tcp.
P.S. If you're running local MySQL server usually you don't need to have it opened for whole world. You can allow only interface lo (local network) to connect through 3306/TCP and drop every other connection to 3306/TCP, just like this:
Q: Everything is fine but where I can find my SA token?
A: SA token and serveradmin password will be printed on your first TS3 server run. If you've just finished installation simply write "screen -r" as user teamspeak and look into console. You can also check logs located in subfolder called "logs" in your teamspeak server folder. It's even easier way than looking into console.
************************************************** **************************************************
It has been tested with Ubuntu "Precise" 12.04 and Debian "Wheezy" 7.0 running MySQL Server 5.5.24 with latest updates at 30.06.2012
************************************************** **************************************************Last edited by ARCHI; 02-09-2012 at 05:11.
-
30-06-2012, 20:26 #2
-= TeamSpeak Fanatic =-
- Join Date
- Jan 2010
- Location
- Germany
- Posts
- 2,038
Nice and proper Tutorial, should help quite a few people (that is if they were to use the Search -.-).
However (you knew it was coming right
): Screen is not required and just another piece of software in between things (not to mention it using resources that could be better spend). The recommended way to start TS3 Server is using the startscript which in above environment would be:
The only thing you loose is being able to attach to the Server Console output but that is just a theoretical loss since anything that gets written to the console is also written into the Logfiles, which can be live viewed too using tail.Code:/home/teamspeak/teamspeak/ts3server_startscript.sh start inifile=ts3server.ini
Would be cool if you could change that last part
Other than that great Tutorial
-
30-06-2012, 20:46 #3
-= TeamSpeak Addict =-
- Join Date
- Oct 2010
- Location
- Warsaw / Poland
- Posts
- 234
Yup, that's why I've written that ;]If for some reason you don't want to use screen just type ./ts3server_minimal_runscript.sh inifile=ts3server.ini as user teamspeak in teamspeak directory.
-
02-07-2012, 22:36 #4
-= TeamSpeak User =-
- Join Date
- Mar 2010
- Location
- Cyberspace
- Posts
- 5
Very nice tut. indeed,
I'm running ts3 on a SHARED NO ROOT ACCESS Debian/squeeze with library libmysqlclient.so.16
. I've tried putting libmysqlclient.so.15.0.0 in my ts3 install Dir and symlinked it, also tried renaming it libmysqlclient.so.15 and also tried to put it on PATH. Still ldd still reports missing.
I tried hassling my host about it and he won't help. Is there anything else that can be tried?
Thanks
edit:
Played with setting the LD_LIBRARY_PATH and ldd gives me this:
But then, starting the server I still get this:Code:[apricot ~/private/teamspeak3] ldd libts3db_mysql.so linux-vdso.so.1 => (0x00007fff43f35000) libmysqlclient.so.15 => /media/sdb1/home/seeder99/private/teamspeak3/bin/usr/lib/libmysqlclient.so.15 (0x00007f26cec74000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f26ce956000) libm.so.6 => /lib/libm.so.6 (0x00007f26ce6d3000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f26ce4bd000) libc.so.6 => /lib/libc.so.6 (0x00007f26ce15b000) libpthread.so.0 => /lib/libpthread.so.0 (0x00007f26cdf3e000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x00007f26cdd07000) libnsl.so.1 => /lib/libnsl.so.1 (0x00007f26cdaef000) libz.so.1 => /usr/lib/libz.so.1 (0x00007f26cd8d7000) /lib64/ld-linux-x86-64.so.2 (0x00007f26cf287000)
I'm at a lost here..........Code:[apricot ~/private/teamspeak3] ./ts3server_minimal_runscript.sh inifile=ts3server.ini 2012-07-03 03:25:02.384924|INFO |ServerLibPriv | | TeamSpeak 3 Server 3.0.6.1 (2012-06-29 07:59:05) 2012-07-03 03:25:02.385202|INFO |DatabaseQuery | | Please make sure you use the supplied ts3server_minimal_runscript.sh to run the server, or set LD_LIBRARY_PATH yourself 2012-07-03 03:25:02.385234|CRITICAL|DatabaseQuery | | unable to load database plugin library "libts3db_mysql.so", halting!
Last edited by Micma; 03-07-2012 at 04:31.
-
04-07-2012, 03:53 #5
-= TeamSpeak Addict =-
- Join Date
- Oct 2010
- Location
- Warsaw / Poland
- Posts
- 234
Hey.
Symlinking .so.15 with .so.16 won't work. Yes, these libraries are same if we're talking about function but they're completely uncompatible with self.
I've attached my "standalone" libmysqlclient15, you can download it here http://www.justarchi.pl/spam/libmysqlclient.so.15 put it somewhere and make symlink to it. It will work ONLY with Debian 64-bit, as I'm running this architecture, if you need 32-bit library extract it yourself or install one of above packages f.e. on virtualbox and extract it from here.
It SHOULD work if you'll get working library and make symlink to it. But easiest way is just installing required packages (root/sudo needed, yup).
Good luck, I'll help you as much as I can.
-----
// Added Troubleshooting part. I'll solve more problems soon.Last edited by ARCHI; 04-07-2012 at 04:41.
-
04-07-2012, 22:32 #6
-= TeamSpeak User =-
- Join Date
- Mar 2010
- Location
- Cyberspace
- Posts
- 5
Success
Eureka, success at last

I dload your version of libmysqlclient.so.15 and put it in my TS3 install dir. I did not symlink it. Tried with LD_LIBRARY_PATH:/my_install_dir and It still refused to work.
Doing some reading I came across this line of code:
And it worked, created the database and started the server.Code:export LD_LIBRARY_PATH="."
Thanks for everything!
-
05-07-2012, 20:28 #7
-= TeamSpeak Addict =-
- Join Date
- Oct 2010
- Location
- Warsaw / Poland
- Posts
- 234
No problem. I'm happy that my standalone version helped
. Have Fun.
-
30-08-2012, 05:18 #8
-= TeamSpeak User =-
- Join Date
- Aug 2012
- Posts
- 1
This is probably a weird question, but I followed your tutorial to the T and it was amazing help for a linux beginner like myself. Thank you, I have the server running and such, but one thing I noticed was that during the steps you outlined, you never mentioned where one would see the one-time server token that is made to get superadmin. I'm stuck at this step exactly. I have a virtual server with no admin and I can't really make any changes to it. Is there way for me to retrieve this token or would I have to create another virtual server to regenerate it? Is there a simple way to do that using your tutorial?
Nevermind, I figured out where it was after i did some digging around.
To anyone interested; The way I found it was that you must log in as teamspeak user and go into the server folder and it should be in the logs folders in one of the logs, you'll find the token.
Thank you for the tutorial, I was at wits end, been working on it on and off for like 3 days, but i'm excited to learn more about this Operating System.
-
30-08-2012, 05:26 #9
-= TeamSpeak Fanatic =-
- Join Date
- Jul 2006
- Posts
- 1,573
There is no superadmin token. Only a serveradmin login + password (which is the one with the most power) and a one-time-usable token for gaining access to a single virtualserver. (Of course you are able to create many of those tokens)
Those virtualserver startup tokens can be found in the virtualserver's logfile
-
30-08-2012, 19:39 #10
-= TeamSpeak Addict =-
- Join Date
- Oct 2010
- Location
- Warsaw / Poland
- Posts
- 234
Yeah somehow I forgot about that. On your first run of TS3 Server you'll get all needed stuff (serveradmin password and token) - it will be printed in your console (or screen if you're using it), also it's available in logs as you guessed.
Will add it somewhere later. I'm happy that my tutorial was useful for you
.
-
31-08-2012, 11:46 #11
-= TeamSpeak Addict =-
- Join Date
- Sep 2006
- Location
- Germany / Hannover
- Posts
- 133
2 things i want to suggest:
first: please write in bold that you dont need screen to start ts3 on regular basis (or remove it completely). It doesnt make sense to use screen (except for a few exceptions).
second: you dont need a separate inifile for the mysql parameters.
You can write all the mysql stuff (include the [config] line) in the normal ini and set the dbpluginparameter to the ts3inifile itself.
Originally Posted by server.ini
otherwise: a nice and working tutorial !
-
02-09-2012, 05:10 #12
-= TeamSpeak Addict =-
- Join Date
- Oct 2010
- Location
- Warsaw / Poland
- Posts
- 234
I've edited screen part a bit. It's okay now.
About ini part: Personally I don't like to have "passwords" and "config" in one file. For example using method of two files you can give someone access to config file while you don't share any database passwords and giving him possibility to log in. I don't think that it's necessary
.
-
09-11-2012, 18:07 #13
-= TeamSpeak User =-
- Join Date
- Sep 2011
- Posts
- 1
Centos 6 and libmysqlclient15of / libmysqlclient.so.15 Errors
Also related error message:
Solution might be helpfull to someone in future:2012-11-09 17:45:55.287786|INFO |ServerLibPriv | | TeamSpeak 3 Server 3.0.6.1 (2012-06-29 07:59:05)
2012-11-09 17:45:55.288146|INFO |DatabaseQuery | | Please make sure you use the supplied ts3server_minimal_runscript.sh to run the server, or set LD_LIBRARY_PATH yourself
2012-11-09 17:45:55.288180|CRITICAL|DatabaseQuery | | unable to load database plugin library "libts3db_mysql.so", halting!
#1
You can get Rpm from here: http://rpm.pbone.net/index.php3/stat....i386.rpm.htmlCode:$ mkdir /tmp/ts3 $ cd /tmp/ts3 $ wget <URL-to-one-of the-mysql-5.0.77-packages> $ rpm2cpio mysql-5.0.77-4.el5_5.4.i386.rpm | cpio -idv
#2
Code:cd /tmp/ts3/usr/lib/mysql/ cp libmysqlclient.so.15 /usr/lib
#3
#4 Start TS-server the same way that the original Post States.cd /path/to/Ts/server/
ldd libts3db_mysql.so
linux-gate.so.1 => (0x00707000)
libmysqlclient.so.15 => /usr/lib/libmysqlclient.so.15 (0x00110000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x0072b000)
libm.so.6 => /lib/libm.so.6 (0x00b52000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00457000)
libc.so.6 => /lib/libc.so.6 (0x008e5000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x003ca000)
libnsl.so.1 => /lib/libnsl.so.1 (0x00274000)
libssl.so.6 => not found
libcrypto.so.6 => not found
libz.so.1 => /lib/libz.so.1 (0x00fea000)
/lib/ld-linux.so.2 (0x00cf8000)
libfreebl3.so => /lib/libfreebl3.so (0x00d99000)
libdl.so.2 => /lib/libdl.so.2 (0x0071a000)
Optional1: If your missing libssl.so.6 or other libs try the following:
Code:yum provides libssl.so.6
openssl098e-0.9.8e-17.el6.centos.2.i686 : A compatibility version of a general cryptography and TLS library
Repo : base
Matched from:
Other : libssl.so.6kind regards,Code:yum install openssl098e-0.9.8e-17.el6.centos.2.i686
Q-WulfLast edited by Q-wulf; 09-11-2012 at 18:22.
-
13-11-2012, 03:21 #14
-= TeamSpeak Lover =-
- Join Date
- May 2007
- Location
- Alabama
- Posts
- 51
How to run server on CentOS using mysql
Greetings, I've been googling and googling and googling and I can't seem to find the answer on how to exactly get a new install of teamspeak 3 using mysql on centos.
I've have tried numerous results from searches and each have produced different results.
From a clean centos server, how do I go about properly making the server use mysql?
-
13-11-2012, 13:15 #15
-= TeamSpeak Team=-
- Join Date
- Sep 2012
- Posts
- 3,064
Several threads around installing the server on a linux based operating system. The commands obviously differ slightly depending on the distribution you are using but it's all basic install package x stuff that differs.
If you already have a MySQL server running you can just download and extract TeamSpeak, setup the configuration files for the TeamSpeak server to use the MySQL Server and you're pretty much done.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
HELP PLEASE. can't isntall teamspeak3 server amd64 on ubuntu server 11.04
By 1luislopes1 in forum Linux / FreeBSDReplies: 0Last Post: 03-11-2012, 04:23 -
TS3 Ubuntu/Debian repository
By danmackay in forum Suggestions and FeedbackReplies: 1Last Post: 24-11-2011, 14:40 -
Problem with installation of TeamSpeak3 Server on Linux DEBIAN LENNY amd64
By fweiss in forum Linux / FreeBSDReplies: 2Last Post: 11-01-2011, 07:39 -
Debian/ubuntu package
By Elbandi in forum Linux / FreeBSDReplies: 6Last Post: 07-06-2010, 13:06


Reply With Quote
