Re: How to install TeamSpeak3 Server on CentOS

This is used for general discussion that is not necessarily server-related.
Post Reply
User avatar
kraze
Former staff
Former staff
Posts: 4362
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Fri Sep 17, 2010 9:06 am
Location: California

Re: How to install TeamSpeak3 Server on CentOS

Post by kraze »

Original topic was split and moved to the KB section http://forums.nfoservers.com/viewtopic. ... 332#p67332

Thanks for the guide! Couple quick suggestions. You'll want to make a note that users will need to figure out what the latest TS3 server version is before attempting to download it so they don't download an older version. I'd also tweak/remove the section about port forwarding. Since we don't block any ports on our end, and the OS shouldn't block any by default adding exemptions may not be needed.
@Kraze^NFo> Juski has a very valid point
@Juski> Got my new signature, thanks!
@Kraze^NFo> Out of context!
@Juski> Doesn't matter!
@Juski> You said I had a valid point! You can't take it back now! It's out there!
User avatar
Markie
A regular
A regular
Posts: 56
Joined: Mon Oct 01, 2012 11:55 am
Location: AS14586

Re: How to install TeamSpeak3 Server on CentOS

Post by Markie »

kraze wrote:Thanks for the guide! Couple quick suggestions. You'll want to make a note that users will need to figure out what the latest TS3 server version is before attempting to download it so they don't download an older version. I'd also tweak/remove the section about port forwarding. Since we don't block any ports on our end, and the OS shouldn't block any by default adding exemptions may not be needed.
Yes, I wasn't fully satisfied with the version details bit.. also I may add, port forwarding is required for CentOS 7+, as firewalld is installed by default. There was actually two ways of going about this, adding the ports through firewalld or completely disabling/removing firewalld, I went with the more secure route ;).

Completely remove firewalld (not recommended, but useful for those whom want to install iptables instead).

Code: Select all

systemctl stop firewalld
systemctl disable firewalld
yum remove firewalld
I have already edited a saved copy of my post locally, I'm not allowed to edit it on here directly :(.

---

Once we have our teamspeak user created, we want to go ahead and switch to the home directory (as root) and grab the latest TS3 server files available here; http://dl.4players.de/ts/releases/ (remember that you're looking for 3.0.11.X or greater, just append the version number to file name as shown below).

Code: Select all

cd /home/teamspeak/
wget http://dl.4players.de/ts/releases/3.0.11.3/teamspeak3-server_linux-amd64-3.0.11.3.tar.gz
User avatar
kraze
Former staff
Former staff
Posts: 4362
Joined: Fri Sep 17, 2010 9:06 am
Location: California

Re: How to install TeamSpeak3 Server on CentOS

Post by kraze »

I've gone ahead and added your tweak in. The port forwarding is likely fine, I just didn't want users getting confused on it. Before I move it to the KB section did you have any other tweaks you want to make?
@Kraze^NFo> Juski has a very valid point
@Juski> Got my new signature, thanks!
@Kraze^NFo> Out of context!
@Juski> Doesn't matter!
@Juski> You said I had a valid point! You can't take it back now! It's out there!
User avatar
Markie
A regular
A regular
Posts: 56
Joined: Mon Oct 01, 2012 11:55 am
Location: AS14586

Re: How to install TeamSpeak3 Server on CentOS

Post by Markie »

Yes! I made two small spelling/wording mistakes that need to be corrected.

---

[original]
First, we'll start off by creating a new user for TS3 to run on (for security purposes, it's not advised to run TS3 as root) during this particular tutorial, will be using the username teamspeak, with a password of teamspeak.

[modified]
First, we'll start off by creating a new user for the TS3 server to run on (for security purposes, it's not advised to run TS3 as root) however, during this particular tutorial, we'll be using the username teamspeak, with a password of teamspeak.

---

[original]
Now that our server files are ready, we will be switching to our teamspeak and going into the servers directory to start up TS3 for the first time.
*please note that this step is extremely crucial, as we must obtain the server query admin account information used for modifying/administrating the server.

[modified]
Now that the server files are prepared, we will be switching to our teamspeak user, going into the servers directory, and starting up TS3 for the first time.
*please note that this step is extremely crucial, as we must obtain the server query admin account information used for administrating & modifying the server.

---

Thanks!!
User avatar
kraze
Former staff
Former staff
Posts: 4362
Joined: Fri Sep 17, 2010 9:06 am
Location: California

Re: How to install TeamSpeak3 Server on CentOS

Post by kraze »

I've gone ahead and split the topic and moved it to the KB section.
http://forums.nfoservers.com/viewtopic. ... 332#p67332

If you'd like to make any other tweaks just post them here.
@Kraze^NFo> Juski has a very valid point
@Juski> Got my new signature, thanks!
@Kraze^NFo> Out of context!
@Juski> Doesn't matter!
@Juski> You said I had a valid point! You can't take it back now! It's out there!
User avatar
Markie
A regular
A regular
Posts: 56
Joined: Mon Oct 01, 2012 11:55 am
Location: AS14586

Re: How to install TeamSpeak3 Server on CentOS

Post by Markie »

Markie wrote:Yes! I made two small spelling/wording mistakes that need to be corrected.

---

[original]
First, we'll start off by creating a new user for TS3 to run on (for security purposes, it's not advised to run TS3 as root) during this particular tutorial, will be using the username teamspeak, with a password of teamspeak.

[modified]
First, we'll start off by creating a new user for the TS3 server to run on (for security purposes, it's not advised to run TS3 as root) however, during this particular tutorial, we'll be using the username teamspeak, with a password of teamspeak.

---

[original]
Now that our server files are ready, we will be switching to our teamspeak and going into the servers directory to start up TS3 for the first time.
*please note that this step is extremely crucial, as we must obtain the server query admin account information used for modifying/administrating the server.

[modified]
Now that the server files are prepared, we will be switching to our teamspeak user, going into the servers directory, and starting up TS3 for the first time.
*please note that this step is extremely crucial, as we must obtain the server query admin account information used for administrating & modifying the server.

---

Thanks!!
Forgot these slight changes =p
User avatar
kraze
Former staff
Former staff
Posts: 4362
Joined: Fri Sep 17, 2010 9:06 am
Location: California

Re: How to install TeamSpeak3 Server on CentOS

Post by kraze »

...when I added in your changes I ended up copying the original and not the modified :/ Should be corrected now.
@Kraze^NFo> Juski has a very valid point
@Juski> Got my new signature, thanks!
@Kraze^NFo> Out of context!
@Juski> Doesn't matter!
@Juski> You said I had a valid point! You can't take it back now! It's out there!
User avatar
Markie
A regular
A regular
Posts: 56
Joined: Mon Oct 01, 2012 11:55 am
Location: AS14586

Re: How to install TeamSpeak3 Server on CentOS

Post by Markie »

Need to modify the port forwarding bit, left out --permanent. =/

Code: Select all

firewall-cmd --permanent --zone=public --add-forward-port=port=9987:proto=udp:toport=9987
firewall-cmd --permanent --zone=public --add-forward-port=port=10011:proto=tcp:toport=10011
firewall-cmd --permanent --zone=public --add-forward-port=port=30033:proto=tcp:toport=30033
firewall-cmd --reload
User avatar
kraze
Former staff
Former staff
Posts: 4362
Joined: Fri Sep 17, 2010 9:06 am
Location: California

Re: How to install TeamSpeak3 Server on CentOS

Post by kraze »

Updated.
@Kraze^NFo> Juski has a very valid point
@Juski> Got my new signature, thanks!
@Kraze^NFo> Out of context!
@Juski> Doesn't matter!
@Juski> You said I had a valid point! You can't take it back now! It's out there!
User avatar
Markie
A regular
A regular
Posts: 56
Joined: Mon Oct 01, 2012 11:55 am
Location: AS14586

Re: How to install TeamSpeak3 Server on CentOS

Post by Markie »

TeamSpeak decided to change the format and syntax of their directories which effectively broke my guide, here's an updated verson.

Here is step-by-step a tutorial for installing a TeamSpeak3 Server on CentOS 7.X, with an additional auto-start script!

-Prerequisites // Before we get started
-General setup // Setting up your TS3 server
  • First, we'll start off by creating a new user for the TS3 server to run on (for security purposes, it's not advised to run TS3 as root) however, during this particular tutorial, we'll be using the username teamspeak, with a password of teamspeak.

    Code: Select all

    useradd teamspeak
    passwd teamspeak
    Once we have our teamspeak user created, we want to go ahead and switch to the home directory (as root) and grab the latest TS3 server files available here; http://dl.4players.de/ts/releases/ (remember that you're looking for 3.0.12.X or greater, just append the version number to file name as shown below).

    Code: Select all

    cd /home/teamspeak/
    wget http://dl.4players.de/ts/releases/3.0.12.4/teamspeak3-server_linux_amd64-3.0.12.4.tar.bz2
    At this point, we must extract the file contents and remember to set the correct permissions.

    Code: Select all

    tar -jxvf teamspeak3-server_linux_amd64-3.0.12.4.tar.bz2
    chmod 0755 -R teamspeak3-server_linux_amd64
    Now that the server files are prepared, we will be switching to our teamspeak user, going into the servers directory, and starting up TS3 for the first time.
    *please note that this step is extremely crucial, as we must obtain the server query admin account information used for administrating & modifying the server.

    Code: Select all

    su teamspeak
    cd /home/teamspeak/teamspeak3-server_linux_amd64/
    ./ts3server_startscript.sh start
    Usage, remember to always use teamspeak user (start, stop, restart & status).

    Code: Select all

    su teamspeak
    cd /home/teamspeak/teamspeak3-server_linux_amd64/
    ./ts3server_startscript.sh start
    ./ts3server_startscript.sh stop
    ./ts3server_startscript.sh restart
    ./ts3server_startscript.sh status
-Port forwarding // TS3 requires ports; 9987 udp (VoiceServer), 10011 tcp (ServerQuery) & 30033 tcp (FileTransfer)
  • Code: Select all

    firewall-cmd --permanent --zone=public --add-forward-port=port=9987:proto=udp:toport=9987
    firewall-cmd --permanent --zone=public --add-forward-port=port=10011:proto=tcp:toport=10011
    firewall-cmd --permanent --zone=public --add-forward-port=port=30033:proto=tcp:toport=30033
    firewall-cmd --reload
-Autostart script (Optional) // We will now be creating our autostart script
  • Using your favorite text editor (vi in this case) we will be creating a file named teamspeak under ini.d.

    Code: Select all

    vi /etc/rc.d/init.d/teamspeak
    Paste in the content below along with commands :wq or shortcut shift+zz to save.

    Code: Select all

    #!/bin/sh
    # chkconfig: 2345 99 10
    USER="teamspeak"
    TS3='/home/teamspeak/teamspeak3-server_linux-amd64'
    STARTSCRIPT="$TS3/ts3server_startscript.sh"
    cd $TS3
    case "$1" in
    'start')
    su $USER -c "$STARTSCRIPT start"
    ;;
    'stop')
    su $USER -c "$STARTSCRIPT stop"
    ;;
    'restart')
    su $USER -c "$STARTSCRIPT restart"
    ;;
    'status')
    su $USER -c "$STARTSCRIPT status"
    ;;
    *)
    echo "Usage $0 start|stop|restart|status"
    esac
    More permissions!

    Code: Select all

    chmod 0755 /etc/rc.d/init.d/teamspeak
    Adding teamspeak to chkconfig with levels 2,3,4 & 5

    Code: Select all

    chkconfig --add teamspeak
    chkconfig --level 2345 teamspeak on
    Test start, stop & restart our newly created teamspeak service (you may also use status to see if the server is running)

    Code: Select all

    service teamspeak start
    service teamspeak stop
    service teamspeak restart
    service teamspeak status
User avatar
kraze
Former staff
Former staff
Posts: 4362
Joined: Fri Sep 17, 2010 9:06 am
Location: California

Re: How to install TeamSpeak3 Server on CentOS

Post by kraze »

Great! Updated.
@Kraze^NFo> Juski has a very valid point
@Juski> Got my new signature, thanks!
@Kraze^NFo> Out of context!
@Juski> Doesn't matter!
@Juski> You said I had a valid point! You can't take it back now! It's out there!
Post Reply