Install on Ubuntu - Admin-Linux/rathena-pt-br GitHub Wiki

Basic Ubuntu installation guide

This guide assumes you are using Ubuntu 18.04.

(Optional) Create a user for rAthena

Create a new user by running the following command and follow its prompt. Feel free to change rathena to something else.

adduser rathena
usermod -aG sudo rathena

Installing prerequisites for rAthena

Log into your Linux server as your newly created user. After that, update the your apt package lists and pull the updates by running

sudo apt update && sudo apt upgrade

Install packages necessary for compiling C++ source code and other libraries rAthena depends on.

sudo apt install build-essential zlib1g-dev libpcre3-dev

The build-essential package installs GCC 7.4.0 at the time of writing this guide.

Install MariaDB server and development libraries

If you don't have MySQL or MariaDB installed yet, follow the instructions in this link to install MariaDB. After installing MariaDB server, install its header files and libraries.

sudo apt install libmariadb-dev libmariadb-dev-compat

Clone rAthena repository

Ubuntu 18.04 should have Git pre-installed.

cd ~ && git clone https://github.com/rathena/rathena.git

Run the configure script

You can change the option

  • enable-prere to yes if you want pre-renewal mode
  • enable-vip if you want to enable the VIP feature
  • enable-packetver to any client version you want to use.
./configure --enable-epoll=yes --enable-prere=no --enable-vip=no --enable-packetver=20180620

Finally compile rAthena

make clean && make server

Secure your MariaDB installation

Run this command and follow its prompt.

sudo mysql_secure_installation

Configure the database

Create user & database

Enter MariaDB shell

sudo mysql -u root -p

Create a new user and a database for rAthena.

CREATE USER 'rathena'@'localhost' IDENTIFIED BY 'changeme';
CREATE DATABASE rathena;
GRANT ALL ON rathena.* TO 'rathena'@'localhost';

CTRL+C out of the shell and run the following command to import tables needed by rAthena.

cat ./sql-files/*.sql | mysql -u rathena -p rathena

Done

You're done setting up softwares required to run rAthena. The rest is editing configuration files which will not be covered by this guide.