From The Mana World
(Move eAthena information in its own article to clean up tmwserv setup instructions)
 
m (fix double redirect)
 
(40 intermediate revisions by 18 users not shown)
Line 1: Line 1:
== Setting up eAthena on Linux ==
#REDIRECT [[Dev:How_to_Develop]]
<!--
Do NOT revert this page. People apparently skip over the big fat warnings saying not to use it.


=== Checking out and compiling ===
All the important information is already in the new article; if there are any gaps, fill them in *there*.


Start with checking out eAthena from our Subversion server on SourceForge and compiling it:
Just for reference, here's a link to the last version:
 
http://wiki.themanaworld.org/index.php?title=Setting_up_tmwAthena_on_Linux&oldid=21785
$ 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 <code>server-data</code> 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 <code>server-data</code> directory, but note that using <code>$HOME/tmwserver</code> 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 <code>server-data</code> in <code>$HOME/tmwserver</code> 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 <code>server-data</code> to <code>$HOME/tmwserver</code>, or have a symbolic link point there, you need to change these configurations:
 
# Edit eathena.sh and set <code>SRVHOMEDIR</code> to the location of your server-data checkout. Probably something like <code>$HOME/.../server-data</code>.
#* You'll have to add <code>${SRVHOMEDIR}/conf/eathena-monitor.conf</code> as parameter to <code>${SRVHOMEDIR}/eathena-monitor</code> in <code>eathena_start()</code>.
# Edit <code>conf/eathena-monitor.conf</code> and adjust the paths according to the <code>SRVHOMEDIR</code> you previously set in <code>eathena.sh</code>
 
These configurations you have to edit regardless of where you installed the server:
 
# Create a directory where server log files will be stored, usually just do <code>mkdir log</code> in the directory where your servers are located.
# Go to the <code>server-data/conf</code> directory and make a copy of each file ending in <code>.example</code>, 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.
# Edit <code>login_athena.conf</code> and set a password for the <code>ladmin</code> tool at <code>admin_pass</code>, or disable remote administration. Also don't forget to set a game master password at <code>gm_pass</code>.
# Edit <code>char_athena.conf</code> and set a username and password to be used for inter-server communication at <code>userid</code> and <code>passwd</code>. You also may want to customize your server name at <code>server_name</code>.
#* 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 <code>login_ip</code> and <code>login_port</code>.
#* Specify the IP address of the character server as seen from the clients connecting to your server at <code>char_ip</code>. This should usually be your internet IP address.
#* This file is also the place where you can change player starting location and equipment.
# Edit <code>map_athena.conf</code> and set the same inter-server commucation username and password as you did in <code>char_athena.conf</code>.
#* 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 <code>char_ip</code> and <code>char_port</code>.
#* Specify the IP address of the map server as seen from the clients connecting to your server at <code>map_ip</code>.
#* This is the file we currently use to activate new maps and NPCs.
# Edit <code>save/account.txt</code> 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 <code>0  s1  p1  2008-09-15 21:03:38.306  S  3  0  a@a.com  0  127.0.0.1  -  0  </code>, where values are separated by tab characters (except for the space in the date), and <code>s1</code> is the username and <code>p1</code> is the password.
# 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 <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.
 
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 <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>.
 
$ ./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 <code>./eathena.sh restart</code>. 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 <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>.

Latest revision as of 07:49, 18 June 2013

Redirect to: