Results 1 to 11 of 11
-
16-10-2011, 04:37 #1
-= TeamSpeak User =-
- Join Date
- Oct 2011
- Posts
- 8
Simple teamspeak 3 server install with autostart with centos 5 (5.x)
prerequisites: Centos 5.x 64-bit installed (this may or may not work for CentOS 6 maybe someone in thread can confirm)
This guide is for the 64-bit version of CentOS, it should work with 32-bit version of centos if you download the 32-bit linux server and modify the path to the correct one in your init.d teamspeak file
First off, I'm behind a router and have ISPConfig 3 installed and it has firewall that I had to unblock these ports in via my admin tool. I have CentOS firewall and SE linux DISABLED, you can add the ports you need for teamspeak in the customize section for the firewall in setup.. to edit your firewall in CentOS just use the setup command
The following ports will need to be forwarded if you are behind a router and opened in your firewall (or at your own risk disable firewall/SELinux)Code:setup
9987 (UDP)virtual voice server
10011 (TCP)server query
30033 (TCP)file transfer
easy to install teamspeak 3.
how to auto start teamspeak 3 server centos
startup script for teamspeak 3 server centos
Install and run as different user
Code:useradd teamspeak
I didn't have to do this sudo was already installed on my centos 5.7 but just incaseCode:passwd teamspeak
Code:yum install sudo
Then give teamspeak some permissions and comment out a line with visudo command.
if you haven't used VI.. when you find where you need to add text using arrow keys hit the letter "a" to begin editing, once you have added the teamspeak line(like code below) and commented out requiretty you hit "escape" then type ":wq" and hit enter..
and add this right below ## Allow root to run any commands anywhere and root ALL=(All) so it looks like thisCode:visudo
Also you will need to disable requiretty add a number sign in front of the line to comment it out so it looks likeCode:## Allow root to run any commands anywhere root ALL=(ALL) ALL teamspeak ALL=(ALL) ALL
good job! now get out by hitting escape then :wq then enter and login as teamspeak with your passwordCode:#Defaults requiretty
Code:logout
Now that you are logged in as teamspeak, let's download teamspeak 3 server
Go to this website on your machine http://www.teamspeak.com/?page=downloads
pick your server, (im running 64-bit centos so I choose server amd64 under linux)
Agree to terms and conditions and it gives you a direct link to download while you are waiting.. my link is http://teamspeak.gameserver.gamed.de...4-3.0.0.tar.gz so I copy and paste, go into putty and type wget and put in link
to extract then typeCode:wget http://teamspeak.gameserver.gamed.de/ts3/releases/3.0.0/teamspeak3-server_linux-amd64-3.0.0.tar.gz
then remove tar (this will be different if you have installed a different version, just do a quick "ls" to see the file above you need to remove)Code:tar -zxvf teamspeak3-server*
This should put the teamspeak server directory under /home/teamspeak/teamspeak3-server_linux-amd64Code:rm teamspeak3-server_linux-amd64-3.0.0.tar.gz
which will change if you have different version/path/user
Now let's not start it..
login as root
and go to init.dCode:logout
download my teamspeak init.d scriptCode:cd /etc/init.d
if this wget command worked ^^ skip ONLY the marked off section, still need to chmod the teamspeak file..Code:wget http://jump-jets.com/teamspeak
THIS SECTION ONLY IF HOSTED INIT.D TEAMSPEAK FILE IS DOWN
we create teamspeak file
if you don't have nano installedCode:nano teamspeak
I seriously hate vi.. btw nano is easier to useCode:yum install nano
once you have nano open insert this code
PLEASE READCode:#!/bin/bash # # teamspeak Startup script for the Teamspeak 3 Server # # chkconfig: - 85 15 # description: The Teamspeak voip server # # processname: teamspeak # start(){ # If using an SELinux system such as RHEL 4/5, use the command below # instead of the "su": # eval "runuser - jboss -c "$JBOSS_HOME/bin/run.sh > /dev/null 2> /dev/null &" # if the 'su -l ...' command fails (the -l flag is not recognized by my su cmd) try: # sudo -u jboss $JBOSS_HOME/bin/run.sh > /dev/null 2> sudo -u teamspeak /home/teamspeak/teamspeak3-server_linux-amd64/ts3server_startscript.sh start } stop(){ # If using an SELinux system such as RHEL 4, use the command below # instead of the "su": # eval "runuser - jboss -c "$JBOSS_HOME/bin/shutdown.sh -S &" # if the 'su -l ...' command fails try: # sudo -u jboss $JBOSS_HOME/bin/shutdown.sh -S & sudo -u teamspeak /home/teamspeak/teamspeak3-server_linux-amd64/ts3server_startscript.sh stop } restart(){ stop # give stuff some time to stop before we restart sleep 3 # protect against any services that can't stop before we restart # if the 'su -l ...' command fails try: # sudo -u jboss killall java start } case "$1" in start) start ;; stop) stop ;; restart) restart ;; *) echo "Usage: teamspeak {start|stop|restart}" exit 1 esac exit 0
Some of these single lines are too long to fit into putty / nano length wise, I had to go through and backspace some lines that were down on line below
Now hit ctrl+x and y then enter to save, and you will need to chmod it
END OF SECTION
good job! now turn it on for bootCode:chmod 755 teamspeak
now let's start the teamspeak serverCode:chkconfig --levels 235 teamspeak on
Once that’s done, you’ll see a login name, password and token. Keep them safe! (I highlighted and copied via "right mouse click" in putty and this screen went away) When you connect to your teamspeak it will ask for that key and you can put it in and you are an administrator.. hang on to this because you may need it again..Code:/etc/init.d/teamspeak start
Congratulations! You now have a 24/7 Team Speak 3 server.
Troubleshooting below
if you have issues starting the server via /etc/init.d/teamspeak start just go into the teamspeak file and make sure it looks exactly like this, it also won't work if you have teamspeak installed in a different location or different username, it's pretty easy to pick out what line in the teamspeaki file under /etc/init.d/ is actually the command to start/stop the server, restart just runs the start and stop command with a short sleep timer it's just the path to teamspeaks normal startup script with the "start" command, or for STOP the "stop" command
the lines(basically the path to teamspeak folder) you may need to modify in the teamspeak file under /etc/init.d are below
Code:sudo -u teamspeak /home/teamspeak/teamspeak3-server_linux-amd64/ts3server_startscript.sh start
Code:sudo -u teamspeak /home/teamspeak/teamspeak3-server_linux-amd64/ts3server_startscript.sh stop
Last edited by dr_patso; 19-10-2011 at 15:59.
-
16-10-2011, 09:09 #2
-= TeamSpeak User =-
- Join Date
- Oct 2011
- Posts
- 8
I'm going to run through this guide at some point soon make sure everything is written properly.
-
18-10-2011, 04:50 #3
-= TeamSpeak User =-
- Join Date
- Nov 2009
- Location
- az
- Posts
- 7
Im new to this ive done this so whats the commands to test ??? restart stop start ???
-
19-10-2011, 01:40 #4
-= TeamSpeak User =-
- Join Date
- Oct 2011
- Posts
- 8
This is directed towards drzaco
I have updated the guide
if you followed this guide exactly, all you should have to do is go into init.d and remove teamspeak file
then download mine,Code:rm teamspeak
chmod it againCode:wget http://jump-jets.com/teamspeak
then try and start itCode:chmod 755 teamspeak
don't forget to add it to bootCode:/etc/init.d/teamspeak start
Also you may need to do this below for it to autostart correctly.Code:chkconfig --levels 235 teamspeak on
and comment out defaults requiretty so it looks like thisCode:visudo
Code:#Defaults requiretty
Last edited by dr_patso; 19-10-2011 at 06:52.
-
19-10-2011, 07:01 #5
-= TeamSpeak User =-
- Join Date
- Oct 2011
- Posts
- 8
Would appreciate any feedback on this thread... When i search for autostart teamspeak centos on google, everything is way over complicated..
just add my script to init.d (I know nothing about linux and edited one in a few minutes to work, and I have cleaned it up a bit since then)
modify the start lines in that file if needed
chmod 755 the file
run chkconfig for it to run at boot..
-
19-10-2011, 14:51 #6
-= TeamSpeak User =-
- Join Date
- Oct 2011
- Posts
- 2
(sorry for my english, I'm french
)
I've installed TS3 with your guide.
At the end, when launching TS3 I've this error msg :
"Starting the TeamSpeak 3 server
TeamSpeak 3 server started, for details please view the log file
/home/teamspeak/teamspeak3-server_linux-x86/ts3server_startscript.sh: ./ts3server_linux_x86: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory"
Where is the log file ?
I suppose it miss one component in my server ???
Can you help me please ?
Thx
-
19-10-2011, 15:07 #7
-= TeamSpeak User =-
- Join Date
- Oct 2011
- Posts
- 2
Ok, I've try with the amd64 version and it's working.
(My CPU is an x86_64 and not an amd but...)
Now I'll try client connexion at home in a few hours
Is the database creating itself ??? Or must I create it manually and how ?
-
19-10-2011, 15:44 #8
-= TeamSpeak User =-
- Join Date
- Oct 2011
- Posts
- 8
hivasha, I'm not really sure what db you are talking about.. I'm pretty sure Teamspeak 3 server contains all the settings it needs to work properly. I haven't had a problem.
I haven't tested, but I assume this would work for 32-bit server as well, ofcourse with the file paths modified and using 32-bit linux.
I assume you were trying to launch the 32-bit version running on a 64-bit host and that's why it didn't work at first.
-
26-12-2011, 05:38 #9
-= TeamSpeak User =-
- Join Date
- Feb 2010
- Location
- Germany
- Posts
- 4
Hey there,
can someone explain me how i put a script into the autostart by using centos?
Google doesn't help very much.
atm i start it manually with
Code:cd /home/ts3/ ./ts3server_startscript.sh start

Edit by mod
Thread Merged. Next time please use the forum search function.
--- Merged ---
so whats wrongCode:[teamspeak@lvps178-77-99-135 ~]$ /etc/init.d/teamspeak start ts3server.pid found, but no server running. Possibly your previously started server crashed Please view the logfile for details. rm: remove write-protected regular file `ts3server.pid'?
/
--- Merged ---
ok got it:
if you have installed ts3 as root you have to set the ts folder to the "teamspeak" usergroup
als Root:
cd /home/
chown -R teamspeak directoryLast edited by florian_fr40; 26-12-2011 at 07:54.
-
27-12-2011, 14:30 #10
-= TeamSpeak User =-
- Join Date
- Apr 2009
- Location
- DXB
- Posts
- 7
Hello,
I have been running my TS3 server on the root for more than one year now. I have made the following changes into the script. As Am running Centos 5.7 32bit
sudo -u root /root/teamspeak3-server_linux-x86/ts3server_startscript.sh start
sudo -u root /root/teamspeak3-server_linux-x86/ts3server_startscript.sh stop
When applying the code
/etc/init.d/teamspeak start
I get a long list of this error
sudo: /root/teamspeak3-server_linux-x86/ts3server_startscript.sh: command not found
Anything done wrong ?
Regards,,,
-
23-05-2012, 18:45 #11
-= TeamSpeak User =-
- Join Date
- Feb 2012
- Posts
- 3
I confirm that this does not work with CentOS 6. I'll Keep on searching.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
How-To install TeamSpeak 3.0.0 Server | CentOS
By 13lackHawk in forum Linux / FreeBSDReplies: 25Last Post: 03-01-2013, 18:36 -
[Resolved] Autostart on Centos
By ministorm in forum Linux / FreeBSDReplies: 10Last Post: 20-02-2012, 10:14 -
Install a Team speak Server on Linux (CentOS)
By Ethernaly in forum [TeamSpeak 2] Server SupportReplies: 5Last Post: 17-10-2011, 20:45 -
CentOS Install
By loest in forum Linux / FreeBSDReplies: 2Last Post: 30-10-2010, 15:21 -
Need help getting TS to autostart on CentOS 4
By davinhill in forum [TeamSpeak 2] Server SupportReplies: 1Last Post: 07-03-2007, 21:05


Reply With Quote