Difference between revisions of "Installation (Debian)"
(Created page with "This guide covers how to install Hercules on Debian and other versions of Linux that use apt-ge...") |
Revision as of 11:18, 25 November 2013
This guide covers how to install Hercules on Debian and other versions of Linux that use apt-get.
Contents |
Requirements
- Debian or an wikipedia:List_of_Linux_distributions##Debian-based that has the apt-get command
- root access or access to an account that has sudo privileges
- an Internet connection to download install packages
Prerequisites
All of these commands will be typed at the command-line interface.
Install Prerequisites
- Login to your server via SSH, or if you are already logged into a GUI press Ctrl+Alt+T to open a terminal window.
apt-get update apt-get upgrade apt-get dist-update // To update to the latest version of Debian
- Type the following command (this will install GCC, Make, MySQL Server, MySQL header files, PCRE header files, Subversion, and Zlib header files)
-
apt-get install subversion make gcc mysql-server libmysqlclient-dev zlib1g-dev libpcre3-dev screen
-
Create a non-root Linux user
By the principle of least privilege, it is recommended you do NOT run Hercules as root.
- Type the following command to create a non-root Linux account:
-
useradd hercuser
-
Install Hercules
Login as your non-root Linux user
The rest of the setup is done as hercuser (the Linux user you created earlier)
- Logout from root SSH (or minimize the window).
- Login to your server via SSH as the hercuser Linux user.
SVN Checkout
Import MySQL Tables
- Change directory to the sql-files folder.
-
cd sql-files/
-
- Execute these commands:
- When prompted, enter your MySQL root password.
-
mysql -u root -prootpassword hercuser_rodb < main.sql
-
mysql -u root -prootpassword hercuser_rodb < item_db.sql
-
mysql -u root -prootpassword hercuser_rodb < item_db2.sql
-
mysql -u root -prootpassword hercuser_rodb < mob_db.sql
-
mysql -u root -prootpassword hercuser_rodb < mob_db2.sql
-
mysql -u root -prootpassword hercuser_rodb < mob_skill_db.sql
-
mysql -u root -prootpassword hercuser_rodb < mob_skill_db2.sql
-
mysql -u root -prootpassword hercuser_rodblog < logs.sql
- If you are using Renewal you also have to import the following
-
mysql -u root -prootpassword hercuser_rodb < item_db_re.sql
-
mysql -u root -prootpassword hercuser_rodb < item_db2_re.sql
-
mysql -u root -prootpassword hercuser_rodb < mob_db_re.sql
-
mysql -u root -prootpassword hercuser_rodb < mob_skill_db_re.sql
-
NOTE: if you want to use different SQL DBs for login/char/map servers this is the list of databases each server use:
- login-server: global_reg_value, ipbanlist, login, loginlog
- map-server: mapreg, item_db, item_db2, mob_db, mob_db2,mob_skill_db
- char-server: everything else + global_reg_value once again
Note that global_reg_value tables are needed by both login-server and char-server (though it may be different tables)
Configure Hercules
Compile Source Code
cd trunk ./configure make sql
- If you have added plugins for use with Hercules please use the below syntax instead of the above:
cd trunk ./configure make sql plugins
- If you're using Debian 32-bit please use:
cd trunk ./configure --disable-64bit make sql plugins
How to Recompile
In the future (after you update or edit any file in /src) to recompile, add make clean before make sql:
cd trunk ./configure make clean make sql plugins
Start your Hercules Server
//change access mode of athena-start file so that you can execute it. //Use (dos2unix athena-start) if yo uare getting ^M errors ie. newline errors chmod a+x athena-start
//To Start ./athena-start start //To Stop ./athena-start stop //To Restart ./athena-start restart