From The Mana World
(Move eAthena information in its own article to clean up tmwserv setup instructions)
 
m (Raise all headers a level)
Line 1: Line 1:
== Setting up eAthena on Linux ==
This article describes setting up eAthena on a Linux system.


=== Checking out and compiling ===
== Checking out and compiling ==


Start with checking out eAthena from our Subversion server on SourceForge and compiling it:
Start with checking out eAthena from our Subversion server on SourceForge and compiling it:
Line 27: Line 27:
  $ ln -s path/to/were/you/put/server-data/ tmwserver
  $ ln -s path/to/were/you/put/server-data/ tmwserver


=== Configuration ===
== Configuration ==
Now we need to edit some configuration specific to our setup. First, if you did not check out out the <code>server-data</code> to <code>$HOME/tmwserver</code>, or have a symbolic link point there, you need to change these configurations:
Now we need to edit some configuration specific to our setup. First, if you did not check out out the <code>server-data</code> to <code>$HOME/tmwserver</code>, or have a symbolic link point there, you need to change these configurations:


Line 50: Line 50:
# Feel free to browse any of the other configuration files to see what else you may want to change, but I'd recommend first making sure stuff works in the next step.
# Feel free to browse any of the other configuration files to see what else you may want to change, but I'd recommend first making sure stuff works in the next step.


==== Specifying your own update host ====
=== Specifying your own update host ===


When you want to provide your players with a different world from the official server, you need to set up your own update host. You can specify a different update host in <code>conf/login_athena.conf</code> at <code>update_host</code>. The client stores updates downloaded from the update host in an update-host specific directory, in order to avoid filename collisions.
When you want to provide your players with a different world from the official server, you need to set up your own update host. You can specify a different update host in <code>conf/login_athena.conf</code> at <code>update_host</code>. The client stores updates downloaded from the update host in an update-host specific directory, in order to avoid filename collisions.
Line 56: Line 56:
TODO: Provide more information about the files that an update host needs to server.
TODO: Provide more information about the files that an update host needs to server.


=== Running your server ===
== Running your server ==
We have two convenient scripts that allow us to start and stop the server with single commands. The <code>eathena-monitor</code> launches all servers and restarts them when they crash. The <code>eathena.sh</code> shell script is used to start/stop the <code>eathena-monitor</code>.
We have two convenient scripts that allow us to start and stop the server with single commands. The <code>eathena-monitor</code> launches all servers and restarts them when they crash. The <code>eathena.sh</code> shell script is used to start/stop the <code>eathena-monitor</code>.


Line 67: Line 67:
Connect with your client and create your first account to test if everything works fine.
Connect with your client and create your first account to test if everything works fine.


==== Making yourself a GM ====
=== Making yourself a GM ===
Specify your account ID as found in <code>save/account.txt</code> (usually 2000000 for the first account) in <code>conf/gm_account.txt</code>. The level 99 should be the highest. You can set up the GM commands in <code>conf/atcommand_athena.conf</code>.
Specify your account ID as found in <code>save/account.txt</code> (usually 2000000 for the first account) in <code>conf/gm_account.txt</code>. The level 99 should be the highest. You can set up the GM commands in <code>conf/atcommand_athena.conf</code>.

Revision as of 21:55, 4 November 2008

This article describes setting up eAthena on a Linux system.

Checking out and compiling

Start with checking out eAthena from our Subversion server on SourceForge and compiling it:

$ svn co https://themanaworld.svn.sourceforge.net/svnroot/themanaworld/eathena/trunk eathena-tmw
$ cd eathena-tmw
$ make

There's probably lots of warnings while compiling, but you can just ignore that. Once this step is successful, let's grab the server-data module from the same Subversion server. This is where we keep all the server side configuration, scripts and other data.

We'll check it out to a server-data directory, but note that using $HOME/tmwserver requires less editing of configuration files later, since this is the default.

$ cd ..
$ svn co https://themanaworld.svn.sourceforge.net/svnroot/themanaworld/server-data/branches/0.0 server-data
$ cd server-data

Compile the eathena-monitor utility and copy over the server executables:

$ gcc -o eathena-monitor eathena-monitor.c
$ cp -iv ../eathena-tmw/*-server .

Optional step. If you did not check out the server-data in $HOME/tmwserver you can add a symbolic link, so that it looks like you did check it out there:

$ cd $HOME
$ ln -s path/to/were/you/put/server-data/ tmwserver

Configuration

Now we need to edit some configuration specific to our setup. First, if you did not check out out the server-data to $HOME/tmwserver, or have a symbolic link point there, you need to change these configurations:

  1. Edit eathena.sh and set SRVHOMEDIR to the location of your server-data checkout. Probably something like $HOME/.../server-data.
    • You'll have to add ${SRVHOMEDIR}/conf/eathena-monitor.conf as parameter to ${SRVHOMEDIR}/eathena-monitor in eathena_start().
  2. Edit conf/eathena-monitor.conf and adjust the paths according to the SRVHOMEDIR you previously set in eathena.sh

These configurations you have to edit regardless of where you installed the server:

  1. Create a directory where server log files will be stored, usually just do mkdir log in the directory where your servers are located.
  2. Go to the server-data/conf directory and make a copy of each file ending in .example, removing that extension. These files are generally server-specific and we don't want changes made on the Subversion server to unexpectedly affect your local configuration.
  3. Edit login_athena.conf and set a password for the ladmin tool at admin_pass, or disable remote administration. Also don't forget to set a game master password at gm_pass.
  4. Edit char_athena.conf and set a username and password to be used for inter-server communication at userid and passwd. You also may want to customize your server name at server_name.
    • Specify the IP address and, if you changed it, the port of the login server as seen from the host on which you run the character server at login_ip and login_port.
    • Specify the IP address of the character server as seen from the clients connecting to your server at char_ip. This should usually be your internet IP address.
    • This file is also the place where you can change player starting location and equipment.
  5. Edit map_athena.conf and set the same inter-server commucation username and password as you did in char_athena.conf.
    • Specify the IP address and, if you changed, the port of the character server as seen from the host on which you run the map server at char_ip and char_port.
    • Specify the IP address of the map server as seen from the clients connecting to your server at map_ip.
    • This is the file we currently use to activate new maps and NPCs.
  6. Edit save/account.txt and add the inter-server communication account that you set for the character and map servers under ID 0. This line will look something like 0 s1 p1 2008-09-15 21:03:38.306 S 3 0 a@a.com 0 127.0.0.1 - 0 , where values are separated by tab characters (except for the space in the date), and s1 is the username and p1 is the password.
  7. Feel free to browse any of the other configuration files to see what else you may want to change, but I'd recommend first making sure stuff works in the next step.

Specifying your own update host

When you want to provide your players with a different world from the official server, you need to set up your own update host. You can specify a different update host in conf/login_athena.conf at update_host. The client stores updates downloaded from the update host in an update-host specific directory, in order to avoid filename collisions.

TODO: Provide more information about the files that an update host needs to server.

Running your server

We have two convenient scripts that allow us to start and stop the server with single commands. The eathena-monitor launches all servers and restarts them when they crash. The eathena.sh shell script is used to start/stop the eathena-monitor.

$ ./eathena.sh start
$ ./eathena.sh restart
$ ./eathena.sh stop

Note that there are also GM commands that allow you to restart for example the map server. This is preferred over using ./eathena.sh restart. Also be sure to announce the restart to your players, since this doesn't happen automatically.

Connect with your client and create your first account to test if everything works fine.

Making yourself a GM

Specify your account ID as found in save/account.txt (usually 2000000 for the first account) in conf/gm_account.txt. The level 99 should be the highest. You can set up the GM commands in conf/atcommand_athena.conf.