Newbie Spellweaver
- Joined
- Mar 1, 2011
- Messages
- 94
- Reaction score
- 25
Okay in this guide I will teach you how to setup a Ragnarok Server using a CentOS.
You will need the following
WinSCP on your local PC
Putty on your local PC
Subversion
MySQL 5
phpMyAdmin
Installing necessary packages to create a server
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Before anything else, you need to configure mysql's root password
Step 7
Installing phpMyAdmin
Installation of all packages are done! Now we go into configuring the files.
Server Configuration
Step 1
Checking out server files on the official repository server! Using a pre-compiled server files just stops you from learning the process, I highly recommend checking out fresh files, since you don't know what's inside the files
Step 2
Since we already have the new user to access SSH, logout on your root account and login using the new user you have just made a while ago. We will now check out the server files.
Step 3
Now that we already got our server files, let's now move to configuring the IP and MySQL
Step 4
Now that we have configured the server IP and username and passwords, we should now configure the SQL Databases for our server
Step 5
Now that everything is set, we should now configure our server so that we can start it yey!
I will create another tutorial on how to make your own CLEAN Executable Client to connect on your server
If you have any questions, please do not hesitate to post!
-Tribalist
You will need the following
WinSCP on your local PC
Putty on your local PC
Subversion
MySQL 5
phpMyAdmin
Installing necessary packages to create a server
Step 1
Assuming you already got a CentOS VPS or Dedicated Server with root access, download
Open putty and connect to your VPS/Dedicated Server using root account. Since it's a freshly ordered VPS/Dedi, you need to install the necessary tools to make a server.
You must be registered to see links
Open putty and connect to your VPS/Dedicated Server using root account. Since it's a freshly ordered VPS/Dedi, you need to install the necessary tools to make a server.
Step 2
Installing subversion
Execute this command in putty
then it will ask you something like "Is this Ok? (y/N)" type in y then hit enter and it will download and install subversion.
Execute this command in putty
Code:
yum install subversion
Step 3
Installing compilers for you to be able to compile the source of the server
Execute this command in putty
Execute this command in putty
Code:
yum install gcc
yum install gcc-c++
Step 4
Installing php packages
Execute this command
Execute this command
Code:
sudo yum -y install php-cli php-gd php-mbstring php-mcrypt php-mhash php-mysql php-pdo php-xmlrpc
Step 5
Installing MySQL
Execute this command
Execute this command
Code:
yum install mysql-server mysql-devel
Step 6
Before anything else, you need to configure mysql's root password
To setup root password for the first time, execute this command:
Changing the root password, execute this command:
Code:
mysqladmin -u root password NEWPASSWORD
Changing the root password, execute this command:
Code:
mysqladmin -u root -p'oldpassword' password newpass
Step 7
Installing phpMyAdmin
Assuming your VPS/Dedi already have apache (almost all hosting company installs apache by default), navigate to your html folder.
Assuming you are currently on root folder since you are logged in as root account
run this command to navigate to html folder
then download phpMyAdmin package from the official site by using wget command
I won't go into detailed installation on phpMyAdmin.. You can visit this
Assuming you are currently on root folder since you are logged in as root account
run this command to navigate to html folder
Code:
cd ../var/www/html
I won't go into detailed installation on phpMyAdmin.. You can visit this
You must be registered to see links
.Installation of all packages are done! Now we go into configuring the files.
Server Configuration
Step 1
Checking out server files on the official repository server! Using a pre-compiled server files just stops you from learning the process, I highly recommend checking out fresh files, since you don't know what's inside the files
Let's first add a new user since using root account in everything you do is risky!
Create an account and make the directory for the user.
execute this command:
replace username by your own username
example:
the command above will create a directory inside the home folder and will also create the user tribalist
now let's give the ownership to /hom/tribalist directory to tribalist user
the command above will add the ownership rights on the /home/tribalist directory and create a password for the user tribalist
after creating a new user, you might want to give proper permissions to the user, or add it on the root group, or prolly add the user to the sudoers group. You may search google on that
Create an account and make the directory for the user.
execute this command:
Code:
useradd -d /home/username -s /bin/bash -c "Name FamilyName" username
example:
Code:
useradd -d /home/tribalist -s /bin/bash -c "Tribalist Surname" tribalist
now let's give the ownership to /hom/tribalist directory to tribalist user
Code:
chown username /home/tribalist && passwd tribalist
after creating a new user, you might want to give proper permissions to the user, or add it on the root group, or prolly add the user to the sudoers group. You may search google on that
Step 2
Since we already have the new user to access SSH, logout on your root account and login using the new user you have just made a while ago. We will now check out the server files.
Assuming you are already logged in as the new user, for this example I will use tribalist as the new user.
Execute the following command:
This will change one directory backward, then type
this will show that you have a tribalist directory, now navigate back to the tribalist directory using:
Let's proceed with the checkout, execute this command on putty:
I am assuming here that you already know how to use svn related commands, in the example above, you will checkout the HEAD Revision (Latest Revision) of the server files that is on the trunk branch, the command will create trunk directory inside the tribalist directory and will download the server files there.
You can also checkout by this way
this will checkout the files inside the "serverfiles" directory instead of the default trunk directory.
Wait for the checkout to finish.
Execute the following command:
Code:
cd ..
Code:
ls
Code:
cd tribalist
Let's proceed with the checkout, execute this command on putty:
Code:
svn co http://eathena-project.googlecode.com/svn/trunk/
You can also checkout by this way
Code:
svn co http://eathena-project.googlecode.com/svn/trunk/ serverfiles
Wait for the checkout to finish.
Step 3
Now that we already got our server files, let's now move to configuring the IP and MySQL
Installation of WinSCP on your local windows PC!
-Download WinSCP from
-Install it and open WinSCP
Now that you have finally installed WinSCP, login to your server using WinSCP with your tribalist user!
-Navigate to the server files, and open conf folder.
-Inside that folder, open char_athena.conf and do the following
1. Create your Server Communication username and password.
Default:
Change it to:
NOTE: change serverusername and serverpassword to your own!
Change this
to this
Change this
to this
Now save and close char_athena.conf and open login_athena.conf
Find..
Change to
save and close login_athena.conf and open map_athena.conf
Find..
Change to the same serverusername and serverpassword you made on char_athena.conf
Find..
Change to..
Find..
Change to..
Save and close map_athena.conf!
-Download WinSCP from
You must be registered to see links
-Install it and open WinSCP
Now that you have finally installed WinSCP, login to your server using WinSCP with your tribalist user!
-Navigate to the server files, and open conf folder.
-Inside that folder, open char_athena.conf and do the following
1. Create your Server Communication username and password.
Default:
Code:
userid: s1
passwd: p1
Code:
userid: serverusername
passwd: serverpassword
Change this
Code:
//login_ip: 127.0.0.1
Code:
login_ip: YOUR.WAN.IP.HERE
Change this
Code:
//char_ip: 127.0.0.1
Code:
char_ip: YOUR.WAN.IP.HERE
Now save and close char_athena.conf and open login_athena.conf
Find..
Code:
new_account: yes
Code:
new_account: no
Find..
Code:
userid: s1
passwd: p1
Find..
Code:
//char_ip: 127.0.0.1
Code:
char_ip: YOUR.WAN.IP.HERE
Find..
Code:
//map_ip: 127.0.0.1
Code:
map_ip: YOUR.WAN.IP.HERE
Step 4
Now that we have configured the server IP and username and passwords, we should now configure the SQL Databases for our server
Assuming you are done installing phpMyAdmin, login to your phpMyAdmin using root mysql user!
Assuming again you know how to create and add user on phpmyadmin (If you don't know how to, search google!), create your ragnarok main and log database.
NOTE: Do not use "ragnarok" as your database name! It's very common and is risky!
You should create two databases, one for main and one for logs.
Now create a new mysql user and then add proper database permissions for that user to the main and log database.
NOTE: For testing purposes, grant all permissions first if this is your first time creating a ragnarok server.
NOTE: You should have a copy of main.sql and log.sql on your local PC. These files can be found in the sql-files folder on your server files, just copy it on your local PC using WinSCP
Now select your main database, from the menu in phpMyAdmin, click SQL, and then import, browse your main.sql and then import it, it will create the tables on your main database.
Now select your log database and then import log.sql and it should create tables for your log database.
-Changing default s1/p1 server username and password-
Select your main database and execute this query
Since this is a new server, you should only have 1 result and that is the default server username and password which is s1/p1, now edit that and change it to the serverusername and serverpassword you have created on char_athena.conf earlier! Then save!
Now Go back to your WinSCP and open conf/inter_athena.conf
Find..
Edit the necessary settings, IP should be your WAN IP, leave the port at 3306, id and password should be the one you created on phpmyadmin server_db should be the main database name, and for log_db_db is the log database name!
Assuming again you know how to create and add user on phpmyadmin (If you don't know how to, search google!), create your ragnarok main and log database.
NOTE: Do not use "ragnarok" as your database name! It's very common and is risky!
You should create two databases, one for main and one for logs.
Now create a new mysql user and then add proper database permissions for that user to the main and log database.
NOTE: For testing purposes, grant all permissions first if this is your first time creating a ragnarok server.
NOTE: You should have a copy of main.sql and log.sql on your local PC. These files can be found in the sql-files folder on your server files, just copy it on your local PC using WinSCP
Now select your main database, from the menu in phpMyAdmin, click SQL, and then import, browse your main.sql and then import it, it will create the tables on your main database.
Now select your log database and then import log.sql and it should create tables for your log database.
-Changing default s1/p1 server username and password-
Select your main database and execute this query
Code:
SELECT * FROM `login`;
Now Go back to your WinSCP and open conf/inter_athena.conf
Find..
Code:
// Global SQL settings
// overriden by local settings when the hostname is defined there
// (currently only the login-server reads/obeys these settings)
sql.db_hostname: 127.0.0.1
sql.db_port: 3306
sql.db_username: ragnarok
sql.db_password: ragnarok
sql.db_database: ragnarok
sql.codepage:
// MySQL Character SQL server
char_server_ip: 127.0.0.1
char_server_port: 3306
char_server_id: ragnarok
char_server_pw: ragnarok
char_server_db: ragnarok
// MySQL Map SQL Server
map_server_ip: 127.0.0.1
map_server_port: 3306
map_server_id: ragnarok
map_server_pw: ragnarok
map_server_db: ragnarok
// MySQL Log SQL Database
log_db_ip: 127.0.0.1
log_db_port: 3306
log_db_id: ragnarok
log_db_pw: ragnarok
log_db_db: log
log_codepage:
Step 5
Now that everything is set, we should now configure our server so that we can start it yey!
Let's go back to putty, login using your tribalist username!
Navigate to your server files directory (for this example we let's assume that the server files directory is called trunk
Now Let's compile it!
Execute this command:
and then..
NOTE: If you are getting "Permission Denied" on executing ./configure command, do this
and then
then..
and then try compiling! It should compile!
Now that we have compiled the server it's time to start it!
Execute this command:
and it should work! You can now connect on your server! Congratulations!
NOTE: When exiting on putty, do not press CTRL+C as it will terminate the map-server and will stop you from connecting to your server, instead, press CTRL+A+D
Navigate to your server files directory (for this example we let's assume that the server files directory is called trunk
Code:
cd trunk
Execute this command:
Code:
./configure
Code:
make clean && make sql
NOTE: If you are getting "Permission Denied" on executing ./configure command, do this
Code:
cd ..
Code:
chmod +x trunk
Code:
cd trunk
Now that we have compiled the server it's time to start it!
Execute this command:
Code:
./athena-start start
and it should work! You can now connect on your server! Congratulations!
NOTE: When exiting on putty, do not press CTRL+C as it will terminate the map-server and will stop you from connecting to your server, instead, press CTRL+A+D
I will create another tutorial on how to make your own CLEAN Executable Client to connect on your server
If you have any questions, please do not hesitate to post!
-Tribalist
Last edited: