(For Newbie)Rathena Server build 2018 ubuntu 14 x64

Joined
Feb 20, 2013
Messages
32
Reaction score
6
Note: You need PortFoward for Online to make mysql can connection to database
Requirements
Code:
FileZilla
PuTTY
Text editor (Sublime or Notepad++ recommended)
apache2 - If you're planning to use phpMyAdmin for remote mysql access and setting up your website.
php5 - For web and phpMyAdmin.
phpmyadmin - Remote MySQL access using a web browser.
mysql-server - our database for the game server.
mysql-client
git
make
gcc
libmysqlclient-dev
zlib1g-dev
libpcre3-dev
libssl-dev

First you need create non-root user
Code:
[COLOR=#3A3A3A]adduser [/COLOR][COLOR=#E94849]username[/COLOR]
Code:
Set password prompts:Enter new UNIX password:
Retype new UNIX password:
[COLOR=#3A3A3A]passwd: password updated successfully[/COLOR]
Code:
User information prompts:Changing the user information for username
Enter the new value, or press ENTER for the default
    Full Name []:
    Room Number []:
    Work Phone []:
    Home Phone []:
    Other []:
[COLOR=#3A3A3A]Is the information correct? [Y/n][/COLOR]
Use the usermod command to add the user to the sudo group
Code:
[COLOR=#3A3A3A]usermod -aG sudo [/COLOR][COLOR=#E94849]username[/COLOR]

Code:
[COLOR=#3A3A3A]sudo ls -la /username[/COLOR]
Login as new user use this command
Code:
[TABLE="class: highlight tab-size js-file-line-container"]
[TR]
[TD="class: blob-code blob-code-inner js-file-line"]sudo apt-get install php phpmyadmin mysql-server mysql-client git make gcc libmysqlclient-dev zlib1g-dev libpcre3-dev
sudo apt-get update[/TD]
[/TR]
[TR]
[TD="class: blob-code blob-code-inner js-file-line"]sudo apt-get install build-essential software-properties-common -y && \[/TD]
[/TR]
[TR]
[TD="class: blob-code blob-code-inner js-file-line"]sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \[/TD]
[/TR]
[TR]
[TD="class: blob-code blob-code-inner js-file-line"]sudo apt-get update && \[/TD]
[/TR]
[TR]
[TD="class: blob-code blob-code-inner js-file-line"]sudo apt-get install gcc-snapshot -y && \[/TD]
[/TR]
[TR]
[TD="class: blob-code blob-code-inner js-file-line"]sudo apt-get update && \[TABLE="class: highlight tab-size js-file-line-container"]
[TR]
[TD="class: blob-code blob-code-inner js-file-line"]sudo apt-get install gcc-5 g++-5 -y && \[/TD]
[/TR]
[/TABLE]

quit;[/TD]
[/TR]
[/TABLE]
Download Rathena files
Code:
git clone [URL]https://github.com/rathena/rathena.git[/URL] ~/rAthena
cd rAthena
git pull

Code:
MySQL setupservice mysql status
service mysql start ( If mysql not running )

(Login into mysql)
mysql -u root -p
CREATE DATABASE ragnarok;
GRANT ALL ON ragnarok.* TO username@localhost IDENTIFIED BY "YouPassword";
quit;
mysql -u username -pYouPassword ragnarok  < /path/to/your/rathena folder/sql-files/main.sql

mysql -u username -pYouPassword ragnarok < /path/to/your/rathena folder/sql-files/logs.sql

Ok now we must login into phpmyadmin
open browser ( YouIP/phpmyadmin ) if you can't access google it

Select the ragnarok database and choose the login table. We can see that there's one record in that table. Do not delete/modify it yet. It is used by the server. To create a game account, click the SQL tab while on the login table to open the insert. Run the following
Code:
[COLOR=#616366]account_id = [/COLOR][B]2000000[/B][COLOR=#616366] (Always start with 2000000, then 2000001...)
[/COLOR][COLOR=#616366]userid = [/COLOR][B]admin[/B][COLOR=#616366] (Your in-game username)
[/COLOR][COLOR=#616366]user_pass = [/COLOR][B]password123[/B][COLOR=#616366] (The password for your account)
[/COLOR][COLOR=#616366]sex = [/COLOR][B]M[/B][COLOR=#616366] (M or F, do not use S because its just for the server)
[/COLOR][COLOR=#616366]email = [/COLOR][B]email@email.com[/B][COLOR=#616366] (Your account's email, used for deleting character slots in-game)
[/COLOR][COLOR=#616366]group_id = [/COLOR][B]99[/B][COLOR=#616366] (refer to [/COLOR]/rathena/conf/groups.conf[COLOR=#616366] and check the id lines. As for now, 99 to make this a GM account for special command usage ingame.)
[/COLOR][COLOR=#616366]character_slots = [/COLOR][B]9[/B][COLOR=#616366] (Number of characters that can be created per account)[/COLOR]
Configuring the server files
Edit char_athena.conf and map_athena.conf with your preferred text editor.
Edit char_athena.conf from

Code:
    // Login Server IP
    // The character server connects to the login server using this IP address.
    // NOTE: This is useful when you are running behind a firewall or are on
    // a machine with multiple interfaces.
    login_ip: YouIP

    // The character server listens on the interface with this IP address.
    // NOTE: This allows you to run multiple servers on multiple interfaces
    // while using the same ports for each server.
    //bind_ip: 127.0.0.1

    // Login Server Port
    login_port: 6900

    // Character Server IP
    // The IP address which clients will use to connect.
    // Set this to what your server's public IP address is.
    char_ip: YouIP

In the inter_athena.txt file, make these changes all you info database and password
Compiling rAthena server

Choice you client at


Login Filezilla or wincp go to rAthena/scr/config/packet.h change it.
Code:
#ifndef PACKETVER    /// Do NOT edit this line! To set your client version, please do this  instead:    
/// In Windows: Add this line in your src\custom\defines_pre.h file: 
#define PACKETVER YYYYMMDD    
/// In Linux: The same as above or run the following command: ./configure --enable-packetver=YYYYMMDD    
#define PACKETVER 20171204
#endif

Code:
./configure --enable-packetver=YYYYMMDD
./configure --enable-packetver=20171204

make server
( if you want to recompile back use this command below)./configure --enable-debug=gdb && make clean server


Starting the server

after you done compile file server use this command
Code:
./athena-start start
./athena-start stop
./athena-start restart


After you done and server running perfect , you need diff you own Ragexe change ip at clientinfo in grf data
patch find it at google (
ROenglishRE-master )

 
Last edited:
Newbie Spellweaver
Joined
Jan 3, 2009
Messages
55
Reaction score
2
I might suggest using MobaXterm instead of PuTTY URl the free home edition has some limitations but is overall a lot easier to work with.
 
Initiate Mage
Joined
Jan 19, 2023
Messages
1
Reaction score
0
Simon Tatham's PuTTY ( ) is probably the best known Telnet/FTP/SSH client, but its Web presence has changed somewhat over time and as a result it gets overlooked for other forks like KiTTY or Tunnelier even here at TPFC forums (BTW, the page at looks like a courtesy of Bitvise).