TeamSpeak3 server installation on a server with CentOS 8
The following guide explains how to install the server on the server TeamSpeak3 CentOS 8 with a few simple steps.
Let's get started!
For starters make off SELinux
edit file:
1 | nano /etc/selinux/config |
And set:
1 | SELINUX=disabled |
Save the file and install the necessary packages:
1 | dnf install nano wget perl tar net-tools bzip2 |
Go to the installation of the TS server.
We create a new user:
1 | adduser teamspeak -d /opt/teamspeak |
The next step is to download Teamspeak server packages
1 | wget http://dl.4players.de/ts/releases/3.8.0/teamspeak3-server_linux_amd64-3.8.0.tar.bz2 |
I unpack:
1 | tar xvf teamspeak3-server_linux_amd64-3.8.0.tar.bz2 |
Move files to a location /opt/teamspeak/
1 | mv teamspeak3-server_linux_amd64/* /opt/teamspeak/ |
We accept license
1 | touch /opt/teamspeak/.ts3server_license_accepted |
The next step is assigning the appropriate permissions:
1 | chown -R teamspeak: /opt/teamspeak |
We create a service to our ts boot with system.
create a file
1 | nano /lib/systemd/system/teamspeak.service |
The content:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | [Unit] Description=Team Speak 3 Server After=network.target [Service] WorkingDirectory=/opt/teamspeak/ User=teamspeak Group=teamspeak Type=forking ExecStart=/opt/teamspeak/ts3server_startscript.sh start inifile=ts3server.ini ExecStop=/opt/teamspeak/ts3server_startscript.sh stop PIDFile=/opt/teamspeak/ts3server.pid RestartSec=15 Restart=always [Install] WantedBy=multi-user.target |
Then we reload the demon:
1 | systemctl --system daemon-reload |
The next step is to run the TeamSpeak server and its startup:
1 2 | systemctl start teamspeak systemctl enable teamspeak |
After checking the service command :
1 | systemctl status teamspeak |
we should see operating properly service:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ? teamspeak.service - Team Speak 3 Server Loaded: loaded (/usr/lib/systemd/system/teamspeak.service; disabled; vendor preset: disabled) Active: active (running) since Sun 2019-10-27 12:51:44 EDT; 5s ago Process: 1298 ExecStart=/opt/teamspeak/ts3server_startscript.sh start inifile=ts3server.ini (code=exited, status=0/SUCCESS) Main PID: 1305 (ts3server) Tasks: 12 (limit: 5060) Memory: 25.3M CGroup: /system.slice/teamspeak.service ??1305 ./ts3server inifile=ts3server.ini daemon=1 pid_file=ts3server.pid Oct 27 12:51:44 centos8 systemd[1]: Starting Team Speak 3 Server... Oct 27 12:51:44 centos8 ts3server_startscript.sh[1298]: Starting the TeamSpeak 3 server Oct 27 12:51:44 centos8 ts3server_startscript.sh[1298]: TeamSpeak 3 server started, for details please view the log file Oct 27 12:51:44 centos8 systemd[1]: Started Team Speak 3 Server. |
ServerAdmin Privilege key is available in the log:
1 | cat /opt/teamspeak/logs/* |
1 2 3 4 5 6 7 8 9 10 11 12 13 | 2019-10-27 17:06:00.334499|INFO | | |Puzzle precompute time: 4434 2019-10-27 17:06:00.335662|INFO |FileManager | |listening on 0.0.0.0:30033, [::]:30033 2019-10-27 17:06:00.337563|INFO |VirtualSvrMgr | |executing monthly interval 2019-10-27 17:06:00.337837|INFO |VirtualSvrMgr | |reset virtualserver traffic statistics 2019-10-27 17:06:00.376549|INFO |Query | |listening for query on 0.0.0.0:10011, [::]:10011 2019-10-27 17:06:00.377080|INFO |Query | |listening for query ssh on 0.0.0.0:10022, [::]:10022 2019-10-27 17:06:00.377152|INFO |Query | |creating QUERY_SSH_RSA_HOST_KEY file: ssh_host_rsa_key 2019-10-27 17:06:06.649531|INFO |CIDRManager | |updated query_ip_whitelist ips: 127.0.0.1/32, ::1/128, 2019-10-27 17:06:00.374048|INFO |VirtualServer |1 |listening on 0.0.0.0:9987, [::]:9987 2019-10-27 17:06:00.375751|WARNING |VirtualServer |1 |-------------------------------------------------------- 2019-10-27 17:06:00.375818|WARNING |VirtualServer |1 |ServerAdmin privilege key created, please use the line below 2019-10-27 17:06:00.375857|WARNING |VirtualServer |1 |token=2y8a9yBz5aRlyDUwaBfgw8lq4FtQVT47pyAeU4Ja 2019-10-27 17:06:00.375894|WARNING |VirtualServer |1 |-------------------------------------------------------- |
In this case it: 2y8a9yBz5aRlyDUwaBfgw8lq4FtQVT47pyAeU4Ja
The last step is to add an exception to the firewall
1 2 3 4 | firewall-cmd --zone=public --add-port=9987/udp --permanent firewall-cmd --zone=public --add-port=10011/tcp --permanent firewall-cmd --zone=public --add-port=30033/tcp --permanent firewall-cmd --reload |