Forum

Page 1 of 8 123 ... LastLast
Results 1 to 15 of 107
  1. #1
    Join Date
    October 2010
    Location
    Warsaw / Poland
    Posts
    296

    Lightbulb [Outdated] Teamspeak3 Server w/ MySQL Databse on Debian/Ubuntu

    Edit by mod
    This tutorial is outdated!!! MySQL was replaced with MaraiDB!



    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.
    Code:
    [email protected]:~# adduser teamspeak
    [email protected]:~# su teamspeak
    [email protected]:/root$ cd ~
    [email protected]:~$ wget http://teamspeak.gameserver.gamed.de/ts3/releases/3.0.6.1/teamspeak3-server_linux-amd64-3.0.6.1.tar.gz
    [email protected]:~$ tar xvf teamspeak3-server_linux-amd64-3.0.6.1.tar.gz
    [email protected]:~$ mv teamspeak3-server_linux-amd64 teamspeak
    [email protected]:~$ cd teamspeak
    [email protected]:~/teamspeak$ chmod +X ts3server_linux_amd64
    [email protected]:~/teamspeak$ chmod +X ts3server_minimal_runscript.sh
    [email protected]:~/teamspeak$ nano ts3server.ini
    In last command you can use your favourite text editor, I used nano.

    Now paste below text to your text editor and save it as ts3server.ini.
    You can edit red bolded text to your preferences.
    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
    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.
    Code:
    [email protected]:~/teamspeak$ su root
    [email protected]:/home/teamspeak/teamspeak# cd ~
    [email protected]:~# apt-get update && apt-get install mysql-server
    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.

    Okay, MySQL Server should be running. Next...

    Code:
    [email protected]:~# mysql -h localhost -u root -p
    mysql> create database teamspeak;
    mysql> grant ALL on teamspeak.* to [email protected] identified by 'your_password_for_mysql_connection';
    mysql> exit

    Let's continue...
    Code:
    [email protected]:~# su teamspeak
    [email protected]:/root$ cd ~/teamspeak
    [email protected]:~/teamspeak$ nano ts3db_mysql.ini
    Now paste below text to your text editor and save it as ts3db_mysql.ini.
    [config]
    host=127.0.0.1
    port=3306
    username=teamspeak
    password=your_password_for_mysql_connection
    database=teamspeak
    socket=
    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...
    Code:
    [email protected]:~/teamspeak$ ldd libts3db_mysql.so
    You should get similar output:
    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)
    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.

    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.

    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:

    Code:
    [email protected]:~/teamspeak$ su root
    [email protected]:/home/teamspeak/teamspeak# cd ~
    [email protected]:~# wget http://security.ubuntu.com/ubuntu/pool/main/m/mysql-dfsg-5.0/libmysqlclient15off_5.0.96-0ubuntu3_amd64.deb
    [email protected]:~# dpkg -i libmysqlclient15off_5.0.96-0ubuntu3_amd64.deb
    And that's it! We've installed missing library for teamspeak. Let's check if everything works fine:
    Code:
    [email protected]:~# su teamspeak
    [email protected]:/root$ cd ~/teamspeak
    [email protected]:~/teamspeak$ ldd libts3db_mysql.so
    Output:
    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)
    Yep, It works just fine.

    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:
    [email protected]:~/teamspeak$ su root
    [email protected]:/home/teamspeak/teamspeak# apt-get install screen


    And let's turn on our server...
    Code:
    [email protected]:/home/teamspeak/teamspeak# cd ~
    [email protected]:~# su teamspeak -c 'screen -d -m -S ts3 /home/teamspeak/teamspeak/ts3server_minimal_runscript.sh inifile=ts3server.ini'
    If you didn't install screen use this command:
    Code:
    [email protected]:/home/teamspeak/teamspeak# cd ~
    [email protected]:~# 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:
    sleep 2
    su teamspeak -c 'screen -d -m -S ts3 /home/teamspeak/teamspeak/ts3server_minimal_runscript.sh inifile=ts3server.ini'
    Or without screen:
    sleep 2
    su teamspeak -c '/home/teamspeak/teamspeak/ts3server_minimal_runscript.sh inifile=ts3server.ini' &
    Sleep is "just in case" if TeamSpeak server will start before MySQL Server.


    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:
    Name:  tsweb.png
Views: 64351
Size:  6.0 KB

    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 dante696; December 2nd, 2014 at 08:24 AM.

  2. #2
    Join Date
    January 2010
    Location
    Germany
    Posts
    2,029
    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:
    Code:
    /home/teamspeak/teamspeak/ts3server_startscript.sh start inifile=ts3server.ini
    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.

    Would be cool if you could change that last part

    Other than that great Tutorial

  3. #3
    Join Date
    October 2010
    Location
    Warsaw / Poland
    Posts
    296
    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.
    Yup, that's why I've written that ;]

  4. #4
    Join Date
    March 2010
    Location
    Cyberspace
    Posts
    6
    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:

    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)
    But then, starting the server I still get this:

    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!
    I'm at a lost here..........
    Last edited by Micma; July 3rd, 2012 at 05:31 AM.

  5. #5
    Join Date
    October 2010
    Location
    Warsaw / Poland
    Posts
    296
    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; July 4th, 2012 at 05:41 AM.

  6. #6
    Join Date
    March 2010
    Location
    Cyberspace
    Posts
    6

    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:

    Code:
    export LD_LIBRARY_PATH="."
    And it worked, created the database and started the server.


    Thanks for everything!

  7. #7
    Join Date
    October 2010
    Location
    Warsaw / Poland
    Posts
    296
    No problem. I'm happy that my standalone version helped . Have Fun.

  8. #8
    Join Date
    August 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.

  9. #9
    Join Date
    July 2006
    Posts
    1,600
    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

  10. #10
    Join Date
    October 2010
    Location
    Warsaw / Poland
    Posts
    296
    Quote Originally Posted by Flowless View Post
    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.
    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 .

  11. #11
    Join Date
    September 2006
    Location
    Germany / Hannover
    Posts
    137
    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.


    Quote Originally Posted by server.ini
    machine_id=
    default_voice_port=9987
    voice_ip=0.0.0.0
    licensepath=
    filetransfer_port=30033
    filetransfer_ip=0.0.0.0
    query_port=10011
    query_ip=0.0.0.0
    query_ip_whitelist=query_ip_whitelist.txt
    query_ip_blacklist=query_ip_blacklist.txt
    dbplugin=ts3db_mysql
    dbpluginparameter=server.ini
    dbsqlpath=sql/
    dbsqlcreatepath=create_mysql/
    logpath=logs
    dblogkeepdays=90
    dbclientkeepdays=90
    logquerycommands=0


    [config]
    host=localhost
    port=3306
    username=ts3mysqlusername
    password=ts3mysqlpassword
    database=ts3
    socket=

    otherwise: a nice and working tutorial !

  12. #12
    Join Date
    October 2010
    Location
    Warsaw / Poland
    Posts
    296
    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 .

  13. #13
    Join Date
    September 2011
    Posts
    1
    Centos 6 and libmysqlclient15of / libmysqlclient.so.15 Errors

    Also related error message:
    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!
    Solution might be helpfull to someone in future:

    #1
    Code:
    $ 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
    You can get Rpm from here: http://rpm.pbone.net/index.php3/stat....i386.rpm.html

    #2

    Code:
    cd /tmp/ts3/usr/lib/mysql/
    cp libmysqlclient.so.15 /usr/lib

    #3
    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)
    #4 Start TS-server the same way that the original Post States.


    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.6
    Code:
    yum install openssl098e-0.9.8e-17.el6.centos.2.i686
    kind regards,
    Q-Wulf
    Last edited by Q-wulf; November 9th, 2012 at 07:22 PM.

  14. #14
    Join Date
    May 2007
    Location
    Alabama
    Posts
    54

    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?

  15. #15
    Join Date
    September 2012
    Posts
    6,044
    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

  1. [DEBIAN] Trying to start teamspeak3 server with screen
    By Ghostaunt in forum Linux / FreeBSD
    Replies: 22
    Last Post: November 10th, 2013, 12:55 PM
  2. Replies: 2
    Last Post: January 11th, 2011, 08:39 AM
  3. Beta20 @ Debian server MySQL
    By kintaro in forum Linux / FreeBSD
    Replies: 12
    Last Post: April 2nd, 2010, 08:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •