|
|
(6 intermediate revisions by 3 users not shown) |
Line 1: |
Line 1: |
| [[category:reference]] | | #REDIRECT [[Dev:How_to_Develop]] |
| This article describes setting up eAthena on a Linux system. For how to set up eAthena on Windows refer to [[Setting up eAthena on Windows]].
| | <!-- |
| | Do NOT revert this page. People apparently skip over the big fat warnings saying not to use it. |
|
| |
|
| == Cloning and compiling ==
| | All the important information is already in the new article; if there are any gaps, fill them in *there*. |
|
| |
|
| Start with cloning eAthena from our [[Git repository]] and compiling it, then compile the eathena-monitor utility. If you are compiling for FreeBSD, use gmake instead of make. Also note that you will need bison and flex installed. If you're using Debian GNU/Linux make sure to also install zlib1g-dev.
| | 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 |
| $ git clone git://gitorious.org/tmw-eathena/mainline.git eathena
| | --> |
| $ cd eathena
| |
| $ make
| |
| $ make tools
| |
| | |
| There's probably lots of warnings while compiling the server executables, but you can just ignore that. If you are having problems cloning eAthena, there are other URLs in the [[Git repository]] article (the push URL will only work if you are a TMW developer). Once this step is successful, let's grab the eAthena data from Git as well. This is where we keep all the server side configuration, scripts and other data.
| |
| | |
| We'll check it out to a <code>eathena-data</code> directory, but note that using <code>$HOME/tmwserver</code> requires less editing of configuration files later, since this is the default.
| |
| | |
| $ cd ..
| |
| $ git clone git://gitorious.org/tmw-eathena-data/mainline.git eathena-data
| |
| $ cd eathena-data
| |
| | |
| If you are having problems cloning eathena-data, there are other URLs in the [[Git repository]] article.
| |
| | |
| Copy over the server executables and monitor:
| |
| | |
| $ cp -iv ../eathena/login-server login-server
| |
| $ cp -iv ../eathena/char-server char-server
| |
| $ cp -iv ../eathena/map-server map-server
| |
| $ cp -iv ../eathena/eathena-monitor eathena-monitor
| |
| $ cp -iv ../eathena/eathena.sh eathena.sh
| |
| | |
| 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 <span style="color:darkgreen;">'''''path/to/were/you/put/eathena-data/'''''</span> tmwserver
| |
| | |
| === Troubleshooting ===
| |
| | |
| When having trouble compiling eathena under Ubuntu x86_64 and receiving an error like "Error: gnu/stubs-32.h: No such file or directory", just install the following lib:
| |
| sudo apt-get install libc6-dev-i386
| |
| | |
| When having trouble linking the map-server under Ubuntu x86_64 and receiving an error like "/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz", just install the following lib:
| |
| sudo apt-get install lib32z1-dev
| |
| | |
| == Mandatory configuration ==
| |
| Now we need to edit some configuration specific to our setup.
| |
| | |
| === Logging ===
| |
| 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.
| |
| | |
| === General configuration ===
| |
| First go to the <code>eathena-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 in the Git repository to unexpectedly affect your local configuration.
| |
| | |
| If you are just going to use the server yourself you can enter <code>127.0.0.1</code> as the value for all IP addresses. Also, if you have no clue about what ports are or which you will be using, leave the default values as they are.
| |
| | |
| The local configurations needed for the three servers are as follow:
| |
| | |
| <code>login_local.conf</code>
| |
| * Set a password for the <code>ladmin</code> tool at <code>admin_pass</code>, or disable remote administration at <code>admin_state</code>.
| |
| ** You should configure the file <code>ladmin_local.conf</code> accordingly, if you choose to leave this tool enabled.
| |
| * Also don't forget to set a game master password at <code>gm_pass</code>.
| |
| | |
| <code>char_local.conf</code>
| |
| * Set a username and password to be used for inter-server communication at <code>userid</code> and <code>passwd</code>.
| |
| * You may optionally 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> (if they are on the same machine, use 127.0.0.1).
| |
| * 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.
| |
| | |
| <code>map_local.conf</code>
| |
| * Set the same inter-server communication username and password as you did in <code>char_local.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> (if they are on the same machine, use 127.0.0.1).
| |
| * Specify the IP address of the map server as seen from the clients connecting to your server at <code>map_ip</code>.
| |
| | |
| Lastly, go to <code>save/</code> and copy the account.txt.example file (as account.txt). If you changed the inter-server passwords, you need to change the username <code style="color:darkgreen;">'''''s1'''''</code> and the password <code style="color:darkgreen;">'''''p1'''''</code> of account 0. Don't change anything else about it.
| |
| | |
| Now make sure everything works by doing a test run of the eAthena server before you make any optional changes.
| |
| | |
| === Path to server data ===
| |
| Please note, if you have checked out out the <code>eathena-data</code> to <code>$HOME/tmwserver</code> or have a symbolic link pointing here, you can skip these steps.
| |
| | |
| * Edit eathena.sh and set <code>SRVHOMEDIR</code> to the location of your server-data checkout. Probably something like <code>$HOME/.../eathena-data</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>
| |
| | |
| == Optional configuration ==
| |
| Here are some pointers if you want to configure your server in other ways than the official TMW server. Feel free to browse any of the other configuration files to see what else you may want to change.
| |
| | |
| * The maps and NPCs that should be available are set in <code>map_athena.conf</code>.
| |
| * The starting location and the starting equipment for the player are set in <code>char_athena.conf</code>.
| |
| * Access levels to GM commands are set in <code>atcommand_local.conf</code>.
| |
| * “The message of today†text shown at login can be changed in <code>motd.txt</code>.
| |
| * The command help texts can be changed in <code>help.txt</code>.
| |
| | |
| === 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_local.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.
| |
| | |
| If you manually run the servers, the char server will segfault the first time it's able to connect with the login server. This is fine. Just restart it. The monitor will handle this automatically.
| |
| | |
| === Troubleshooting ===
| |
| If your server fails to run and/or you cannot connect to it with your client, it is likely to be caused by one or several of the below points. But before you do anything else, check the [[#Logging|logfile]] as it may say what is the cause.
| |
| | |
| * Forgotten or mismatching usernames, passwords, ip addresses and ports.
| |
| *# Check that you have followed all [[#Mandatory configuration|mandatory configuration steps]].
| |
| * Unavailable files.
| |
| *# Check where you did download the server-data. If you did not put in the default directory, please make sure that you have either [[#Checking out and compiling|created a symlink]] that points to the default directory or that you have [[#Path to server data|changed]] the needed configuration files.
| |
| *# Check whether you have [[#Checking out and compiling|created symlinks]] to the three server executables.
| |
| | |
| === 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>.
| |