-
Notifications
You must be signed in to change notification settings - Fork 758
Installation (Debian)
Juan Carlos Lamas Alfaro edited this page Jan 10, 2021
·
3 revisions
This guide covers how to install Hercules on Debian and other versions of Linux that use apt-get.
- 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
All of these commands will be typed at the command-line interface.
- Login to your server via SSH, or if you are already logged into a GUI press Ctrl+Alt+T to open a terminal window.
- Type the following command (this will install GCC, Make, MySQL Server, MySQL header files, PCRE header files, git, and Zlib header files)
apt-get install git make gcc mysql-server libmysqlclient-dev zlib1g-dev libpcre3-dev screen
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
- Be sure not to forget setting new password for new user
passwd hercuser
Install Hercules
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.
git clone https://github.com/HerculesWS/Hercules.git ~/Hercules
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_rodblog < logs.sql
- If your Control Panel software or website requires it, you may also import the item, monster and monster skill databases (not necessary for the correct operation of Hercules)
- (pre-renewal)
mysql -u root -prootpassword hercuser_rodb < item_db.sql
mysql -u root -prootpassword hercuser_rodb < mob_db.sql
mysql -u root -prootpassword hercuser_rodb < mob_skill_db.sql
- (renewal)
mysql -u root -prootpassword hercuser_rodb < item_db_re.sql
mysql -u root -prootpassword hercuser_rodb < mob_db_re.sql
mysql -u root -prootpassword hercuser_rodb < mob_skill_db_re.sql
- (common to renewal and pre-renewal)
mysql -u root -prootpassword hercuser_rodb < item_db2.sql
mysql -u root -prootpassword hercuser_rodb < mob_db2.sql
mysql -u root -prootpassword hercuser_rodb < mob_skill_db2.sql
- login-server: global_acc_reg_num_db, global_acc_reg_str_db, ipbanlist, login, loginlog
- map-server: autotrade_data, autotrade_merchants, mapreg, npc_market_data
- char-server: everything else
cd Hercules ./configure make sql
Note: If during the configure step you run into the "MySQL not found or incompatible" error, you may be able to fix it by installing "libssl-dev" and/or "default-libmysqlclient-dev".
- If you have added plugins for use with Hercules please use the below syntax instead of the above:
cd Hercules ./configure make sql plugins
In the future (after you update or edit any file in /src) to recompile, add make clean before make sql:
cd Hercules ./configure '''make clean''' make sql plugins
//change access mode of athena-start file so that you can execute it. //Use (dos2unix athena-start) if you are 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