准备

  • 服务器

开始

cd /opt

# 下载程序
wget https://files.teamspeak-services.com/releases/server/3.9.1/teamspeak3-server_linux_amd64-3.9.1.tar.bz2
tar xf teamspeak3-server_linux_amd64-3.13.5.tar.bz2 
rm -f teamspeak3-server_linux_amd64-3.13.5.tar.bz2
mv -f teamspeak3-server_linux_amd64/ teamspeak

cd teamspeak/

root@VM-4-7-debian:/opt/teamspeak# ls
CHANGELOG  libts3db_mariadb.so	   libts3db_sqlite3.so	LICENSE  serverquerydocs  ts3server			  ts3server_startscript.sh
doc	   libts3db_postgresql.so  libts3_ssh.so	redist	 sql		  ts3server_minimal_runscript.sh  tsdns

root@VM-4-7-debian:/opt/teamspeak# ./ts3server  # 运行程序
Please set the environment variable TS3SERVER_LICENSE to "accept" in order to accept the license agreement.
Alternatively, create a file named ".ts3server_license_accepted" in the working directory or start the server with the command line parameter "license_accepted=1".
To view the license agreement set TS3SERVER_LICENSE to "view" in order to print the license to the console.
Alternatively view the file "LICENSE" in your favorite text viewer yourself.

# 在当前目录下创建名为 ".ts3server_license_accepted" 表示同意许可

# 创建文件
touch .ts3server_license_accepted
# 运行程序
./ts3server

2021-06-10 04:03:19.083658|INFO    |ServerLibPriv |   |TeamSpeak 3 Server 3.13.5 (2021-05-17 08:13:36)
2021-06-10 04:03:19.083816|INFO    |ServerLibPriv |   |SystemInformation: Linux 4.19.0-11-amd64 #1 SMP Debian 4.19.146-1 (2020-09-17) x86_64 Binary: 64bit
2021-06-10 04:03:19.083886|INFO    |ServerLibPriv |   |Using hardware aes
2021-06-10 04:03:19.084408|INFO    |DatabaseQuery |   |dbPlugin name:    SQLite3 plugin, Version 3, (c)TeamSpeak Systems GmbH
2021-06-10 04:03:19.084510|INFO    |DatabaseQuery |   |dbPlugin version: 3.11.1
2021-06-10 04:03:19.084742|INFO    |DatabaseQuery |   |checking database integrity (may take a while)
2021-06-10 04:03:19.093154|INFO    |SQL           |   |db_CreateTables() tables created
2021-06-10 04:03:19.131479|WARNING |Accounting    |   |Unable to open licensekey.dat, falling back to limited functionality
2021-06-10 04:03:19.131836|INFO    |Accounting    |   |Licensing Information
2021-06-10 04:03:19.131919|INFO    |Accounting    |   |licensed to       : Anonymous
2021-06-10 04:03:19.131973|INFO    |Accounting    |   |type              : No License
2021-06-10 04:03:19.132031|INFO    |Accounting    |   |starting date     : Thu Oct  1 00:00:00 2020
2021-06-10 04:03:19.132083|INFO    |Accounting    |   |ending date       : Tue Nov  1 00:00:00 2022
2021-06-10 04:03:19.132132|INFO    |Accounting    |   |max virtualservers: 1
2021-06-10 04:03:19.132212|INFO    |Accounting    |   |max slots         : 32
2021-06-10 04:03:20.865015|INFO    |              |   |Puzzle precompute time: 1714
2021-06-10 04:03:20.865471|INFO    |FileManager   |   |listening on 0.0.0.0:30033, [::]:30033
2021-06-10 04:03:20.866055|INFO    |VirtualSvrMgr |   |executing monthly interval
2021-06-10 04:03:20.866199|INFO    |VirtualSvrMgr |   |reset virtualserver traffic statistics
2021-06-10 04:03:20.869342|INFO    |Query         |   |Using a query thread pool size of 2
2021-06-10 04:03:20.885471|INFO    |VirtualServerBase|1  |listening on 0.0.0.0:9987, [::]:9987
2021-06-10 04:03:20.886044|WARNING |VirtualServer |1  |--------------------------------------------------------
2021-06-10 04:03:20.886134|WARNING |VirtualServer |1  |ServerAdmin privilege key created, please use the line below
2021-06-10 04:03:20.886188|WARNING |VirtualServer |1  |token=r0gQCjJz4J2WakEJm7640VsvkNfvCEpCiBDNBHo1
2021-06-10 04:03:20.886250|WARNING |VirtualServer |1  |--------------------------------------------------------

------------------------------------------------------------------
                      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=r0gQCjJz4J2WakEJm7640VsvkNfvCEpCiBDNBHo1
------------------------------------------------------------------

2021-06-10 04:03:20.886844|INFO    |Query         |   |listening for query on 0.0.0.0:10011, [::]:10011
2021-06-10 04:03:20.887049|INFO    |              |   |creating QUERY_SSH_RSA_HOST_KEY file: ssh_host_rsa_key
2021-06-10 04:03:22.470152|INFO    |              |   |myTeamSpeak identifier revocation list was downloaded successfully - all related features are activated
2021-06-10 04:03:23.106408|INFO    |Query         |   |listening for ssh query on 0.0.0.0:10022, [::]:10022
2021-06-10 04:03:23.106711|INFO    |Query         |   |listening for http query on 0.0.0.0:10080, [::]:10080
2021-06-10 04:03:23.106952|INFO    |CIDRManager   |   |updated query_ip_allowlist ips: 127.0.0.1/32, ::1/128, 
^C2021-06-10 04:03:33.400182|INFO    |ServerMain    |   |Received signal SIGINT, shutting down.
2021-06-10 04:03:33.400366|INFO    |VirtualServerBase|1  |stopped

cat << EOF > /etc/systemd/system/teamspeak.service
[Unit]
Description=TeamSpeak Deamon Service
After=network.target

[Service]
Type=simple
WorkingDirectory=/opt/teamspeak
ExecStart=/opt/teamspeak/ts3server
Restart=always
RestartSec=4

[Install]
WantedBy=multi-user.target
EOF

systemctl daemon-reload
systemctl enable --now teamspeak

输入 Token 获取管理员权限