Difference between revisions of "Hosting multiple servers on Linux"
From Bitfighter
(New page: It is possible to host multiple servers using a single install of Bitfighter. Here is how the official Bitfighter game server is organized: The main game itself is installed in /home/aut...) |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 17: | Line 17: | ||
Then, a shell script can be used to launch the servers: | Then, a shell script can be used to launch the servers: | ||
+ | <source lang="bash"> | ||
cd /home/autron/bf013/exe | cd /home/autron/bf013/exe | ||
− | + | ||
screen -dmS classic ./bitfighterd -hostname "Classic Levels" | screen -dmS classic ./bitfighterd -hostname "Classic Levels" | ||
-hostdescr "[Calif.] Classic levels shipped with Bitfighter" | -hostdescr "[Calif.] Classic levels shipped with Bitfighter" | ||
-rootdatadir "/home/autotron/servers/classic" | -rootdatadir "/home/autotron/servers/classic" | ||
-levelchangepassword changeit -adminpassword adminit | -levelchangepassword changeit -adminpassword adminit | ||
− | + | ||
− | screen -dmS | + | screen -dmS userlevs./bitfighterd -hostname "User Submitted Levels" |
-hostdescr "[Calif.] Levels submitted by users" | -hostdescr "[Calif.] Levels submitted by users" | ||
-rootdatadir "/home/autotron/servers/usrlevs" | -rootdatadir "/home/autotron/servers/usrlevs" | ||
-levelchangepassword changeit -adminpassword adminit | -levelchangepassword changeit -adminpassword adminit | ||
− | + | ||
− | screen -dmS | + | screen -dmS robots./bitfighterd -hostname "Robot Levels" |
-hostdescr "[Calif.] Where the robots play after happy hour" | -hostdescr "[Calif.] Where the robots play after happy hour" | ||
-rootdatadir "/home/autotron/servers/botlevs" | -rootdatadir "/home/autotron/servers/botlevs" | ||
-levelchangepassword changeit -adminpassword adminit | -levelchangepassword changeit -adminpassword adminit | ||
... | ... | ||
+ | </source> | ||
+ | |||
+ | When an update to Bitfighter is available, the code can be updated and compiled easily, then the servers can be restarted. The whole upgrade process takes 5 minutes. |
Latest revision as of 07:04, 18 August 2010
It is possible to host multiple servers using a single install of Bitfighter. Here is how the official Bitfighter game server is organized:
The main game itself is installed in /home/autotron/bf013 All server-specific data is stored in /home/autotron/servers Each server has its own subfolder, which in turn has a levels and robots subfolders.
So the folder tree looks like this:
/home/autotron/bf013/install stuff <-- SVN code checked out here, built with dedicated option servers/classic/levels robots usrlevs/levels robots botlevs/levels robots ...
Then, a shell script can be used to launch the servers:
cd /home/autron/bf013/exe screen -dmS classic ./bitfighterd -hostname "Classic Levels" -hostdescr "[Calif.] Classic levels shipped with Bitfighter" -rootdatadir "/home/autotron/servers/classic" -levelchangepassword changeit -adminpassword adminit screen -dmS userlevs./bitfighterd -hostname "User Submitted Levels" -hostdescr "[Calif.] Levels submitted by users" -rootdatadir "/home/autotron/servers/usrlevs" -levelchangepassword changeit -adminpassword adminit screen -dmS robots./bitfighterd -hostname "Robot Levels" -hostdescr "[Calif.] Where the robots play after happy hour" -rootdatadir "/home/autotron/servers/botlevs" -levelchangepassword changeit -adminpassword adminit ...
When an update to Bitfighter is available, the code can be updated and compiled easily, then the servers can be restarted. The whole upgrade process takes 5 minutes.