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:
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
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:
teamspeak@archi:~/teamspeak$ su root
root@archi:/home/teamspeak/teamspeak# cd ~
root@archi:~# 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:
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…
Code:
root@archi:~# su teamspeak
teamspeak@archi:/root$ cd ~/teamspeak
teamspeak@archi:~/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:
teamspeak@archi:~/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:
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
And that’s it! We’ve installed missing library for teamspeak. Let’s check if everything works fine:
Code:
root@archi:~# su teamspeak
teamspeak@archi:/root$ cd ~/teamspeak
teamspeak@archi:~/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 typescreen -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…
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'
If you didn’t install screen use this command:
Code:
root@archi:/home/teamspeak/teamspeak# cd ~
root@archi:~# su teamspeak -c '/home/teamspeak/teamspeak/ts3server_minimal_runscript.sh inifile=ts3server.ini'
ที่มา: http://forum.teamspeak.com/showthread.php/74883-TUTORIAL-Temaspeak3-Server-w-MySQL-Databse-on-Debian-Ubuntu