Doofus with a VPS. Help!
October 8, 2010 3:24 PM   Subscribe

I am trying to administer several game/etc servers on a rented VPS running CentOS. I am horribly ignorant on how to do this properly and I'm getting overwhelmed. How can I make this easier on myself?

So I'm running three game servers and a Mumble server on my VPS, which is running CentOS 5.5. They're running fine, but it's a huge pain in the rear to deal with them if anything at all goes wrong. This problem can be traced back to my supreme ignorance of running anything remotely from a linux host, I think.

Here's what I do currently: I upload whatever files are needed to a new directory by ftp, ssh to the host, then use the screen command to run the actual server program. I detach the screen, then start another server using the same method. Rinse and repeat. When I see something going wrong with a server, I ssh back into the host and recall the screen. This is a huge hassle, and is mostly ineffective!

I know I'm going about this all wrong and I would like to learn how to do it the right way. Ideally I would like to be able to check on these things using a web interface like Webmin and be able to send the program commands and restart them if need be. What would be an easier way to run and administer several server programs on a remote VPS?
posted by Willie0248 to Computers & Internet (5 answers total)
 
You could use Puppet which Fedora themselves use for automation and it has a web dashboard.
posted by holloway at 3:44 PM on October 8, 2010


You don't need to do the screen thing. Start programs in the background by putting an ampersand after them:

./server &

Most of them should also have a 'daemon' mode... look for this in their documentation.
posted by sonic meat machine at 3:54 PM on October 8, 2010


Backgrounded apps generally die when their parent TTY is closed, like when you logout or detach from an ssh session, so sonic meat machines first suggestion isn't going to help. You'll still need screen or nohup.

On the other hand, seeing if they have a daemon mode is an excellent suggestion. Even better is if they have init scripts to start the servers up if the vps reboots.

That doesn't sound like it solves your problem though, but it should wrestle them into the framework standard Linux services. You could thennuse webmin to start and stop them, and maybe to monitor them.
posted by Good Brain at 4:35 PM on October 8, 2010


1. Is CentOS required? I find that Ubuntu or Debian have a bigger set of packaged tools. For example, mumble and a django powered web interface are in debian and easily installable. But if Counter-Strike or what have you demand CentOS, your hands may be tied. And there's gonna be work involved in conversion.

2. Most of these game servers should have a daemon mode, and probably initscripts you can use to take them down and up. Even if the vendor didn't ship any, it's likely someone else has written and published them.

3. It's very likely you can substitute SCP for FTP. It's a bit more secure that way, and means less programs running at once.

4. Most programs don't reboot themselves from network commands. Tools like webmin or ebox can provide a web interface to run scripts on your server, once you've got it set up.

5. Monitoring is trickier. Nagios scripts can monitor your server basic "is it responding to TCP" availability, and there may be more complicated scripts around if your game server supports something like qstat.
posted by pwnguin at 8:43 PM on October 8, 2010


I'd say you are doing okay right now... welcome to systems administration.

There's no magic answer - read the documents that come with each game server - there's nothing wrong with using gnu screen to keep things managed.

SSH is the standard way most of us would handle remote linux administration.
posted by TravellingDen at 11:24 AM on October 9, 2010


« Older An elegant cat deterrent, for a more civilized age   |   Websites for the previously cave-bound? Newer »
This thread is closed to new comments.