1 准备
1.1 服务器
可以选择购买云服务器,如:阿里云、腾讯云等等,我这里用的是腾讯云。
设置服务器防火墙/安全组:
端口 | 协议 | 说明 |
---|---|---|
9987 | UDP | TeamSpeak默认语音服务端口 |
10011 | TCP | TeamSpeak ServerQuery raw 端口 |
10022 | TCP | TeamSpeak ServerQuery SSH 端口 |
30033 | TCP | TeamSpeak 文件传输端口 |
41144 | TCP | TSDND |
1.2 安装包
teamspeak官网:https://www.teamspeak.com/
客户端:TeamSpeak Downloads | TeamSpeak
服务端:TeamSpeak Downloads | TeamSpeak选择Linux
1.3 Linux基础
掌握一定的Linux操作基础。
2 服务端部署
2.1 创建用户
使用root用户创建teamspeak用户:
useradd teamspeak
passwd teamspeak //保证高强度密码,以防被破解
赋予teamspeak用户sudo权限:
sudo vim /etc/sudoers
找到%wheel ALL=(ALL) ALL,在其下面插入:
teamspeak ALL=(ALL) NOPASSWD:ALL
ESC wq!强制保存。
切换至teamspeak用户:
su - teamspeak
2.2 下载、上传、解压安装包
在官网下载服务端安装包,上传到服务器。或使用wget下载安装包。
wget https://files.teamspeak-services.com/releases/server/3.13.7/teamspeak3-server_linux_amd64-3.13.7.tar.bz2
注意:下载地址可能不是最新,请去官网获得最新地址。
如遇报错
ERROR: cannot verify files.teamspeak-services.com's certificate, issued by ‘/C=US/O=Let's Encrypt/CN=R3’:
Issued certificate has expired.
To connect to files.teamspeak-services.com insecurely, use `--no-check-certificate'.
执行
sudo yum install -y ca-certificates
解压安装包:
tar -jxvf teamspeak3-server_linux_amd64-3.13.7.tar.bz2
若报错:
tar (child): cannot run bzip2: No such file or directory
tar (child): trying lbzip2
tar (child): lbzip2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
执行:
sudo yum install -y bzip2
2.3 服务端启动
允许许可协议:
touch /home/teamspeak/teamspeak3-server_linux_amd64/.ts3server_license_accepted
执行:
/home/teamspeak/teamspeak3-server_linux_amd64/ts3server_startscript.sh start
第一次启动会显示密钥及 ServerQuery 管理员账户和密码,请注意保存.
2.4 设置服务端自动启动
sudo vim /lib/systemd/system/teamspeak.service
输入:
[Unit]
Description=Teamspeak, The most superior online voice communication solution.
Wants=network-online.target
After=syslog.target network.target network-online.target
[Service]
User=teamspeak
Group=teamspeak
WorkingDirectory=/home/teamspeak/teamspeak3-server_linux_amd64/
ExecStart=/home/teamspeak/teamspeak3-server_linux_amd64/ts3server_startscript.sh start
ExecStop=/home/teamspeak/teamspeak3-server_linux_amd64/ts3server_startscript.sh stop
PIDFile=/home/teamspeak/teamspeak3-server_linux_amd64/ts3server.pid
Type=forking
[Install]
WantedBy=multi-user.target
注意:里面涉及到目录的地方请与自身情况相匹配。
ESC :wq保存。
功能 | 指令 |
---|---|
重新加载systemd | sudo systemctl daemon-reload |
开启自启动 | sudo systemctl enable teamspeak.service |
启动TeamSpeak | sudo systemctl start teamspeak.service |
停止TeamSpeak | sudo systemctl stop teamspeak.service |
重启TeamSpeak | sudo systemctl restart teamspeak.service |
TeamSpeak服务端部署完毕。
3 客户端连接
3.1 连接服务器
打开客户端,选择连接:
输入服务器IP,密码(之前生成的),昵称自定义。
进入之后自行编辑服务器信息和频道信息。推荐将频道设置中的音质拉满,提升体验。
如果需要生成更多的token,可以在客户端选择权限秘钥
创建即可。
4 附件
TS汉化插件:Releases · jitingcn/TS3-Translation_zh-CN (github.com)
下载下来双击运行即可。文章来源:https://www.toymoban.com/news/detail-827363.html
5 参考文献
TeamSpeak服务器搭建与使用 | 老虎不吃人 (tdeh.top)文章来源地址https://www.toymoban.com/news/detail-827363.html
到了这里,关于[Linux/Centos7]搭建TeamSpeak服务器的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!