Editing MG/Dedicated Server

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 31: Line 31:
 
Also as ''root'', install dependencies for MegaGlest (this list for sure may be outdated, but missing libs should be quite easy to find out e.g. thanks to error messages from start_megaglest script):
 
Also as ''root'', install dependencies for MegaGlest (this list for sure may be outdated, but missing libs should be quite easy to find out e.g. thanks to error messages from start_megaglest script):
  
  apt-get install xz-utils p7zip-full libsdl2-2.0-0 libglu1 libsm6 libopenal1 libvorbisfile3 libglew1.5 libfontconfig1 libldap-2.4-2 libidn11 binutils
+
  apt-get install xz-utils p7zip-full libsdl2 libglu1 libsm6 libopenal1 libvorbisfile3 libglew1.5 libfontconfig1 libldap-2.4-2 libidn11 binutils
 
 
On older Debian derivates you would need to use package ''libsdl2'' instead of ''libsdl2-2.0-0''.
 
  
 
Now switch to the ''megaglest'' user, this is the last time you need to work as ''root'':
 
Now switch to the ''megaglest'' user, this is the last time you need to work as ''root'':
Line 39: Line 37:
 
  su -l megaglest
 
  su -l megaglest
  
Download [https://github.com/MegaGlest/megaglest-source/releases/ binary] and [https://github.com/MegaGlest/megaglest-data/releases/ data] archives for the latest stable MegaGlest release. If your server runs a 64 bit operating system (the ''arch'' command says ''x86_64'') then go for the 64 bit Linux binary and data archives, otherwise use the 32 bit ones. You can download these using ''wget'', here's an example on how to do it with MegaGlest 3.13.0 for a 64 bit server:
+
Download [https://github.com/MegaGlest/megaglest-source/releases/ binary] and [https://github.com/MegaGlest/megaglest-data/releases/ data] archives for the latest stable MegaGlest release. If your server runs a 64 bit operating system (the ''arch'' command says ''x86_64'') then go for the 64 bit Linux binary and data archives, otherwise use the 32 bit ones. You can download these using ''wget'', here's an example on how to do it with MegaGlest 3.12.0 for a 64 bit server:
  
  wget https://github.com/MegaGlest/megaglest-source/releases/download/3.13.0/megaglest-binary-linux-x86_64-3.13.0.tar.xz
+
  wget https://github.com/MegaGlest/megaglest-source/releases/download/3.12.0/megaglest-binary-linux-x86_64-3.12.0.tar.xz
  wget https://github.com/MegaGlest/megaglest-data/releases/download/3.13.0/megaglest-standalone-data-3.13.0.tar.xz
+
  wget https://github.com/MegaGlest/megaglest-data/releases/download/3.12.0/megaglest-standalone-data-3.12.0.tar.xz
  
Create a directory, add a convenient symbolic link, unpack both archives and delete some files you do not need on a headless server (only!) as follows:
+
Unpack, add a convenient symlink, delete the GUI binaries you do not need on a server and create the configuration directory:
  
  mkdir megaglest-3.13.0
+
  tar -xJf megaglest-standalone-data-3.12.0.tar.xz
  ln -s megaglest-3.13.0 megaglest-server
+
  ln -s megaglest-3.12.0 megaglest-server
 
  cd megaglest-server
 
  cd megaglest-server
# Expanding game data can take a while, it is well compressed
+
  tar -xJf megaglest-binary-linux-x86_64-3.12.0.tar.xz
tar -xJf ../megaglest-standalone-data-3.13.0.tar.xz
+
  rm megaglest_g3dviewer start_megaglest_g3dviewer megaglest_editor start_megaglest_mapeditor
  tar -xJf ../megaglest-binary-linux-x86_64-3.13.0.tar.xz
+
  mkdir -p ~/.megaglest
  rm megaglest_g3dviewer start_megaglest_g3dviewer megaglest_editor start_megaglest_mapeditor *.desktop *.ico
 
 
 
If everything went well, it should look roughly like this:
 
 
 
  megaglest@gameserver:~/megaglest-server$ ls -lF
 
total 120904
 
drwxr-xr-x  2 megaglest megaglest      4096 Mar  8 21:41 blender/
 
-rw-r--r--  1 megaglest megaglest        29 Mar  8 21:41 build-time.log
 
drwxr-xr-x  4 megaglest megaglest      4096 Mar  8 21:43 data/
 
drwxr-xr-x  3 megaglest megaglest      4096 Mar  8 21:43 docs/
 
-rw-r--r--  1 megaglest megaglest      3666 Mar  8 21:41 glest.ini
 
-rw-r--r--  1 megaglest megaglest      1135 Mar  8 21:41 glestkeys.ini
 
-rw-r--r--  1 megaglest megaglest      5333 Mar  8 21:41 ldd-megaglest.log
 
drwxr-xr-x  3 megaglest megaglest      4096 Mar 12 14:31 lib/
 
drwxr-xr-x  2 megaglest megaglest      4096 Mar  8 21:43 maps/
 
-rwxr-xr-x  1 megaglest megaglest 123665044 Mar  8 21:41 megaglest*
 
-rw-r--r--  1 megaglest megaglest      4150 Mar  8 21:41 megaglest.bmp
 
-rwxr-xr-x  1 megaglest megaglest      1775 Mar  8 21:41 megaglest-mini-update.sh*
 
-rw-r--r--  1 megaglest megaglest      4581 Mar  8 21:41 megaglest.png
 
-rw-r--r--  1 megaglest megaglest    17785 Mar  8 21:41 megaglest.xpm
 
drwxr-xr-x 25 megaglest megaglest      4096 Mar  8 21:43 scenarios/
 
-rw-r--r--  1 megaglest megaglest      145 Mar  8 21:41 servers.ini
 
-rwxr-xr-x  1 megaglest megaglest     20252 Mar  8 21:41 start_megaglest*
 
-rwxr-xr-x  1 megaglest megaglest    15548 Mar  8 21:41 start_megaglest_gameserver*
 
drwxr-xr-x  4 megaglest megaglest      4096 Mar  8 21:43 techs/
 
drwxr-xr-x 21 megaglest megaglest      4096 Mar  8 21:43 tilesets/
 
drwxr-xr-x  5 megaglest megaglest      4096 Mar  8 21:43 tutorials/
 
  
 
Do a test run:
 
Do a test run:
  
 
  megaglest@gameserver:~/megaglest-server$ ./start_megaglest --version
 
  megaglest@gameserver:~/megaglest-server$ ./start_megaglest --version
  megaglest v3.13.0
+
  megaglest v3.12.0
  Compiled using: GNUC: 40804 [64bit] platform: Linux-X64 endianness: little
+
  Compiled using: GNUC: 40403 [64bit] on: Jan 18 2014 17:44:55 platform: Linux-X64 endianness: little
  GIT: [Rev: 5607.967257e] - using STREFLOP [SSE] - [no-denormals]
+
  GIT: [Rev: 4628.11ac54a] - using STREFLOP [SSE] - [no-denormals]
 +
megaglest@gameserver:~/megaglest-server$
  
 
If MegaGlest fails to start here, please check the [http://faq.megaglest.org FAQ] .
 
If MegaGlest fails to start here, please check the [http://faq.megaglest.org FAQ] .
Line 100: Line 72:
 
You are now ready to go. However, for advanced configuration, many more options which may matter for a game server are available. Here is an optional example for a more complex <code>~/.megaglest/glestuser.ini</code> file:
 
You are now ready to go. However, for advanced configuration, many more options which may matter for a game server are available. Here is an optional example for a more complex <code>~/.megaglest/glestuser.ini</code> file:
 
  ### For more information on these options, please consult
 
  ### For more information on these options, please consult
  ### [[MG/INI|https://wiki.megaglest.org/INI]]
+
  ### [[MG/INI|http://wiki.megaglest.org/INI]]
 
   
 
   
 
  ### Network settings
 
  ### Network settings
Line 111: Line 83:
 
  #EnableFTPServerInternetTilesetXfer=1
 
  #EnableFTPServerInternetTilesetXfer=1
 
  #EnableFTPXfer=1
 
  #EnableFTPXfer=1
  #Masterserver=[[MG/INI|https://master.megaglest.org/]]
+
  #Masterserver=[[MG/INI|http://master.megaglest.org/]]
 
   
 
   
 
  ### Logging
 
  ### Logging
Line 158: Line 130:
 
To run a headless server and register with the masterserver run:
 
To run a headless server and register with the masterserver run:
  
./start_megaglest --headless-server-mode=exit
+
'''./start_megaglest --headless-server-mode=exit'''
  
(run ''megaglest --help'' to see all available options)
+
(for full options run megaglest --help to see all parameters)
  
 
Currently available game servers are listed at [http://play.mg Play.MG] , so your server should show up there with its IP address and the server/player name you have set. If publishing to the master server does not seem to work try running the server with ''--verbose'' option as discussed in the [http://faq.megaglest.org FAQ]. 
 
Currently available game servers are listed at [http://play.mg Play.MG] , so your server should show up there with its IP address and the server/player name you have set. If publishing to the master server does not seem to work try running the server with ''--verbose'' option as discussed in the [http://faq.megaglest.org FAQ]. 
Line 240: Line 212:
 
[[Category:MG]]
 
[[Category:MG]]
 
[[Category:Multiplayer]]
 
[[Category:Multiplayer]]
[[Category:HOW-TOs]]
 

Please note that all contributions to MegaGlest are considered to be released under the Creative Commons Attribution Share Alike (see MegaGlest:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)