搭建 Teamspeak3 服务器。(ps: 最好直接上 Docker)
环境:Ubuntu 18.04。
新建 teamspeak
用户:
1
2
3
| # adduser --disabled-login teamspeak
# su teamspeak
$ cd ~
|
前往下载页面查看最新服务端版本,并替换之后命令中的版本号。
下载、复制并解压 TS3 服务端文件:
1
2
3
4
| $ wget https://files.teamspeak-services.com/releases/server/3.10.1/teamspeak3-server_linux_amd64-3.10.1.tar.bz2
$ tar -xjvf teamspeak3-server_linux_amd64-3.10.1.tar.bz2
$ mv teamspeak3-server_linux_amd64 teamspeak3-server
$ rm -rf teamspeak3-server_linux_amd64-3.10.1.tar.bz2
|
同意许可条款:
1
2
| $ cd teamspeak3-server
$ touch .ts3server_license_accepted
|
建立启动文件:
1
2
| $ su root
# vim /lib/systemd/system/teamspeak3.service
|
内容为:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
| [Unit]
Description=Teamspeak, The most superior online voice communication solution.
Wants=network-online.target
After=syslog.target network.target network-online.target
[Service]
WorkingDirectory=/home/teamspeak/teamspeak3-server/
User=teamspeak
Group=teamspeak
Type=forking
ExecStart=/home/teamspeak/teamspeak3-server/ts3server_startscript.sh start
ExecStop=/home/teamspeak/teamspeak3-server/ts3server_startscript.sh stop
PIDFile=/home/teamspeak/teamspeak3-server/ts3server.pid
RestartSec=15
Restart=always
[Install]
WantedBy=multi-user.target
|
启动并查看状态:
1
2
| $ systemctl start teamspeak3
$ systemctl status teamspeak3
|
以上。