Basic RPM Installation guide

CentOS 5.x

Download the rpmforge-release package. Choose one of the two links below, depending on your architecture. If you are unsure of which one to use you can check your architecture with the command uname -i

   *      i386 http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
*      x86_64 http://apt.sw.be/redhat/el5/en/x86_64/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm 


Install DAG's GPG key

rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt

Verify the package you have downloaded

rpm -K rpmforge-release-0.3.6-1.el5.rf.*.rpm

<!> Security warning: The rpmforge-release package imports GPG keys into your RPM database. As long as you have verified the md5sum of the key injection package, and trust Dag, et al., then it should be as safe as your trust of them extends.

Install the package

rpm -i rpmforge-release-0.3.6-1.el5.rf.*.rpm

CentOS 4.x

Download the rpmforge-release package. Choose one of the two links below, depending on your architecture. If you are unsure of which one to use you can check your architecture with the command uname -i

   *      i386 http://dag.wieers.com/packages/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.i386.rpm
*      x86_64 http://dag.wieers.com/packages/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.x86_64.rpm 

(You can find a complete list of rpmforge-release package packages at http://dag.wieers.com/packages/rpmforge-release/ but it is recommended that you use one of the two listed above).

Install DAG's GPG key

rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt

Verify the package you have downloaded

rpm -K rpmforge-release-0.3.6-1.el4.rf.*.rpm

<!> Security warning: The rpmforge-release package imports GPG keys into your RPM database. As long as you have verified the md5sum of the key injection package, and trust Dag, et al., then it should be as safe as your trust of them extends.

Install the package

rpm -i rpmforge-release-0.3.6-1.el4.rf.*.rpm

This will add a yum repository config file and import the appropriate GPG keys. At this point, you can set the priority of the RPMForge repository, and also of the CentOS repositories if you have not done so yet.

This part of the article will use subversion to obtain the source code of EA. The structure of subversion will allow the user to download either the trunk or branch of EA. A trunk contains the latest code that would be useful if you are testing or really need a new feature. The branch contains stable source code that has gone through testing and bugfixes to insure that the server will remain stable with the highest uptime possible. Linux

This guide is assuming that you already have the operating system installed. Well first off let me congratulate you on your choice to run a linux server. I can honestly not think of any downsides to running a server with a linux operating system. This Guide also assume you have a 32bit version installed.

RPM Based Distributions of Linux

eAthena Installation Guide for CentOS/Fedora/RHEL/Mandriva/YellowDog/Scientific Linux Other Distro's are only applicable if they have YUM installed.

sudo - for - su

To everyone who is running their Linux with a GUI (Graphical User Interface) I would recommend that you not get too attached to it since we will be using the Terminal/CLI (Command Line Interface). I will give instruction for install a MySQL 5.0 Server at the end. Necessary Programs

For TXT

List of things needed to compile an athena TXT server:

   * Subversion
* Make
* GCC 
* pcre-devel
* zlib-devel

For SQL

List of things needed to compile an athena SQL server:

   * Subversion
* Make
* GCC
* mysql-devel 
* pcre-devel
* zlib-devel

How to install necessary programs

How to install the Packages needed. Using Terminal: For TXT

sudo apt-get install subversion make gcc pcre-devel zlib-devel

For SQL

sudo apt-get install subversion make gcc mysql-devel pcre-devel zlib-devel

 

Obtaining Source Code


svn co http://svn.eathena.ws/svn/ea/trunk trunk
- OR -
svn co http://svn.eathena.ws/svn/ea/branches/stable stable

 

Updating Existing Code

To update the svn that you downloaded through subversion:

svn up http://svn.eathena.ws/svn/ea/trunk
- OR -
svn up http://svn.eathena.ws/svn/ea/branches/stable

Compiling


How to Compile TXT


cd trunk
- OR -
cd stable
chmod a+x configure && chmod a+x athena-start
./configure
make txt plugins
chmod a+x login-server && chmod a+x char-server && chmod a+x map-server

How to Compile SQL


cd trunk
- OR -
cd stable
chmod a+x configure && chmod a+x athena-start
./configure
make sql plugins
chmod a+x login-server_sql && chmod a+x char-server_sql && chmod a+x map-server_sql
How to Recompile

Recompiling is the same as compiling except you always run this command after you configure it

make clean

How to Start

Then to start the TXT server you need to edit the athena-start file Find

L_SRV=login-server_sql
C_SRV=char-server_sql
M_SRV=map-server_sql

and replace it with

L_SRV=login-server
C_SRV=char-server
M_SRV=map-server


To start the servers from there on out, it doesn't matter if the servers are TXT or SQL.

//To Start
./athena-start start
//To Stop
./athena-start stop
//To Restart
./athena-start restart

MySQL setup


Installing MySQL


To Install the Mysql Server there is really only a few things that you have to do

sudo yum install mysql-server

Setting up your own user

Once the server has been installed you will need to call the server from terminal with this command.

mysql -u root

You are now logged into the MySQL server as root and it has no password. The best way to use your own SQL server is to have a username of your own control with your own password. The next command will create your own user. SQL

CREATE USER 'ragnarok'@'%' IDENTIFIED BY 'ragnarok';
GRANT USAGE ON * . * TO 'ragnarok'@'%' IDENTIFIED BY '(your password)';
GRANT USAGE ON * . * TO 'ragnarok'@'localhost' IDENTIFIED BY '(your password)';
GRANT ALL PRIVILEGES ON `ragnarok\_%` . * TO 'ragnarok'@'localhost';
GRANT ALL PRIVILEGES ON `ragnarok\_%` . * TO 'ragnarok'@'%';
FLUSH PRIVILEGES;

Optional Installations


Now on to EVEN more optional Stuff like running a webserver and phpmyadmin.

sudo yum install httpd mod_php php-gd php-pdo php-mysql php-mhash php-mcrypt php-mbstring php-zip php-xml phpmyadmin