Downloading the server files<\/strong><\/h3>\nNow, we’re going to get the latest updates of rAthena server files. These are the files required on running a Ragnarok Online server. There are other server files that can be used, like Hercules and eAthena, but in this tutorial, we’re using rAthena. Run the command below to download the files.<\/p>\n
git clone https:\/\/github.com\/rathena\/rathena.git ~\/rAthena\r\n<\/code><\/pre>\nThis will place all the files inside\u00a0rAthena<\/code>\u00a0of your current directory in terminal.<\/p>\nTo update the server files to latest revision, run this command.<\/p>\n
cd rAthena\r\n git pull\r\n<\/code><\/pre>\n
\nMySQL setup<\/strong><\/h3>\nIn this part, we’re configuring MySQL for the database of our server. First, check if your MySQL Server is running.<\/p>\n
service mysql status\r\n<\/code><\/pre>\nIf its not running, enter this command.<\/p>\n
service mysqld start\r\n<\/code><\/pre>\nAfter running the commands above, open the MySQL console.<\/p>\n
mysql -u root -p\r\n<\/code><\/pre>\nYou will be asked for your root password. After logging in, type the following commands to create the database for our server.<\/p>\n
CREATE DATABASE (your ragnarok database name); — We’ll name it “ragnarok”.<\/p><\/blockquote>\n
mysql> CREATE DATABASE ragnarok;\r\n<\/code><\/pre>\nThen, create a new user for the Ragnarok DB and log DB.<\/p>\n
GRANT ALL ON ragnarok.* TO\u00a0yourdatabaseusername@localhost\u00a0IDENTIFIED BY “yourdesiredpassword”; — We will create a new user called\u00a0admin<\/strong>\u00a0with a password of\u00a0123456<\/strong>.<\/p><\/blockquote>\n mysql> GRANT ALL ON ragnarok.* TO admin@localhost IDENTIFIED BY \"123456\";\r\n<\/code><\/pre>\nYou can replace\u00a0localhost<\/strong>\u00a0with an IP address if you want the user to be able to access your MySQL server remotely.<\/p>\nCreate log database for the Ragnarok game logs.<\/p>\n
CREATE DATABASE (your log database name) — We’ll name it “log”.<\/p><\/blockquote>\n
mysql> CREATE DATABASE log;\r\n<\/code><\/pre>\nSet permissions for the user that we created earlier named\u00a0admin<\/strong>.<\/p>\n mysql> GRANT ALL ON log.* TO admin@localhost;\r\n<\/code><\/pre>\nRestore the required tables in your Ragnarok and log database. Update your password after\u00a0-p<\/code>\u00a0accordingly.<\/p>\nmysql> quit;\r\n\r\nmysql -u admin -p123456 ragnarok < \/path\/to\/your\/rathena folder\/sql-files\/main.sql\r\nmysql -u admin -p123456 log < \/path\/to\/your\/rathena folder\/sql-files\/logs.sql\r\n<\/code><\/pre>\n
\n