搭建 TeamSpeak3 服务器

升级 CentOS 7 系统并安装依赖工具包

yum update

安装相关依赖

yum install vim wget perl tar net-tools bzip2

创建启动用户

TeamSpeak3不允许root用户权限启动

useradd teamspeak
passwd teamspeak  

下载服务端[官方最新地址](TeamSpeak Downloads | TeamSpeak)

wget https://files.teamspeak-services.com/releases/server/3.13.6/teamspeak3-server_linux_amd64-3.13.6.tar.bz2 

解压到用户目录

tar -jxf teamspeak3-server_linux_amd64-3.13.6.tar.bz2 -C /home/teamspeak/

启动 Teamspeak_Server

需要切换到刚刚创建的普通用户来启动服务

su - teamspeak
cd /home/teamspeak/teamspeak3-server_linux_amd64/

touch .ts3server_license_accepted #授权文件同意 TeamSpeak 许可条款

#运行
------------------------------------------------------------------
                      I M P O R T A N T                           
------------------------------------------------------------------
               Server Query Admin Account created                 
         loginname= "serveradmin", password= "XXXXX"
         apikey= "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
------------------------------------------------------------------


------------------------------------------------------------------
                      I M P O R T A N T                           
------------------------------------------------------------------
      ServerAdmin privilege key created, please use it to gain 
      serveradmin rights for your virtualserver. please
      also check the doc/privilegekey_guide.txt for details.

       token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

此时最好将信息复制下来,尤其是后面的 token 后面还会用到。然后 Ctrl + C 停止服务器即可。

创建系统服务

需要root权限

vim /lib/systemd/system/teamspeak.service

[Unit]
Description=Teamspeak server
After=network.target

[Service]
WorkingDirectory=/home/teamspeak/teamspeak3-server_linux_amd64/
User=teamspeak
Group=teamspeak
Type=forking
ExecStart=/home/teamspeak/teamspeak3-server_linux_amd64/ts3server_startscript.sh start inifile=ts3server.ini
ExecStop=/home/teamspeak/teamspeak3-server_linux_amd64/ts3server_startscript.sh stop
PIDFile=/home/teamspeak/teamspeak3-server_linux_amd64/ts3server.pid
RestartSec=15
Restart=always
[Install]
WantedBy=multi-user.target 



#systemctl enable teamspeak.service --now

公网连接需要云服务商放行相应端口

TeamSpeak 默认需要放行的端口包括 9987(udp)、41144(tcp)、10011(tcp)、30033(tcp)。

客户端

汉化包 https://github.com/jitingcn/TS3-Translation_zh-CN/releases