介绍
安装并配置 Teamspeak 服务器软件,并启动一项服务以在后台运行该软件。.
先决条件
- Linux 或 Windows 服务器(专用服务器、KVM 服务器或 LXC 服务器)
- 系统中的根/管理员权限
- 一个与 Linux 兼容的系统
第一步——准备工作
Linux 系统步骤
创建一个新用户,Teamspeak 服务器稍后需要在该用户的上下文中运行。.
root@your_host:~# useradd -m -s /bin/false ts
Windows 系统步骤
安装 NSSM(非吸血服务管理器)后,Teamspeak 服务器将注册为 Windows 服务。.
然后只需打开下载的 ZIP 文件,并导航到适合您服务器架构的文件夹即可。.
在这里您可以轻松地 nssm.exe 在 C:\Windows\System32\ 复制。.
至此,NSSM 安装完成。.
步骤 2 – 安装 Teamspeak 软件
Linux 系统步骤
安装时,必须在系统上执行以下步骤:
root@your_host:~# su --shell /bin/bash ts
ts@your_host:~$ wget -P /tmp/ https://files.teamspeak-services.com/releases/server/3.6.1/teamspeak3-server_linux_amd64-3.6.1.tar.bz2打开下载的压缩包。
ts@your_host:~$ tar xjf /tmp/teamspeak3-server_linux_amd64-3.6.1.tar.bz2 -C /home/ts
接受 Teamspeak 许可协议。
ts@your_host:~$ touch /home/ts/.ts3server_license_accepted
(可选)还有其他方式可以接受许可协议。.
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.更改文件权限
ts@your_host:~$ chmod +x /home/ts/ts3server_startscript.sh
ts@your_host:~$ chmod +x /home/ts/ts3server_minimal_runscript.sh
ts@your_host:~$ chmod +x /home/ts/ts3server首次服务器启动(此数据必须保存)
ts@your_host:~$ /home/ts/ts3server_minimal_runscript.sh
2019-03-16 19:30:44.119638|INFO |SQL | db_CreateTables() tables created
------------------------------------------------------------------
I M P O R T A N T
------------------------------------------------------------------
Server Query Admin Account created
loginname= "serveradmin", password= "DC+sOsIL"
------------------------------------------------------------------
^
2019-03-16 19:30:45.093089|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=q20aDScWvOLg+XL5PpWXUPumhPFaDkStVKE9BpSZ
------------------------------------------------------------------
2019-03-16 19:30:45.093331|INFO |Query |listening for query on 0.0.0.0:10011, [::]:10011Windows 系统步骤
下载 Teamspeak 软件
将压缩包解压到文件夹(例如 C:\teamspeak)
首先,启动服务器。
- 接受许可协议。
- 保存服务器请求数据
- 通过托盘图标结束服务器
步骤 3 – 启动服务
要让 Teamspeak 在没有活动登录的情况下作为后台进程运行,必须创建一个服务。.
Linux 系统步骤
创建服务:
- 创建 systemd 服务
root@your_host:~# nano /etc/systemd/system/ts.service
- 文件中必须包含以下内容:
[Unit]
Description=TeamSpeak 3 Server
After=network.service
[Service]
User=ts
Group=ts
Type=forking
WorkingDirectory=/home/ts/teamspeak3-server_linux_amd64/
ExecStart=/home/ts/teamspeak3-server_linux_amd64/ts3server_startscript.sh start
ExecStop=/home/ts/teamspeak3-server_linux_amd64/ts3server_startscript.sh stop
PIDFile=/home/ts/teamspeak3-server_linux_amd64/ts3server.pid
RestartSec=15
Restart=always
[Install]
WantedBy=multi-user.target服务登记:
下载新的服务条目和变更
root@your_host:~# systemctl daemon-reload
- 启用该服务(重启后将自动启动)
root@your_host:~# systemctl enable ts.service
可以使用以下命令来管理该服务。.
root@your_host:~# systemctl start/stop/restart ts.service
Windows 系统步骤
通过 CMD 启动 NSSM(参数为服务名称)
C:\Users\Administrator>nssm install teamspeak
在“应用程序”选项卡中的“路径”处,必须指定 Teamspeak Server 应用程序的路径。(例如,C:\Users\Administrator\teamspeak\ts3server.exe)
在“安装目录”中,您需要指定整个应用程序文件夹。(在本例中为 C:\Users\Administrator\teamspeak\)
然后,Teamspeak 服务器就可以像 Windows 服务一样正常使用了。.
介绍
本文介绍了在 Windows 或 Linux 系统上安装 Teamspeak 3 服务器并将 Teamspeak 软件注册为服务所需的步骤。.









