Jump to content

How to create a Metin2 private server on dedicated server with Metin2 Project


Message added by AZICKO,

In dev, please use this project ⬇️

 

Recommended Posts

  • Management

 

spacer.png

 

You too? 😱 You want to create a server for our favorite MMORPG?! You will be able to make your dream come true 😍 ! This guide is exclusively compatible with Metin2 Project. Are you ready? 🙃 Gooo! 😏

 

Install the Virtual Machine

Spoiler

 

Prerequisites

 

Introduction

VirtualBox is virtualization software. A Metin2 Server runs mostly on an operating system called FreeBSD. It's therefore necessary to virtualize a second computer within yours to operate your Metin2 Project Server.

It's the virtualization of a second operating system that consumes resources in processor, RAM and storage on the host system, your computer. If you are using a dedicated server, you will install FreeBSD as the main operating system without using Windows!

The Metin2 Project Virtual Machine is ready to use, it's already preconfigured to be usable, even for a neophyte!

 

Ready? Gooo!

You need to open the « OVA » file by clicking on it, like to open your favorite software. The extension is recognized automatically by Windows and is associated with VirtualBox. You must click on the button « IMPORT » and let VirtualBox work, it imports your Metin2 Project Virtual Machine for your greatest happiness 🥰 !

 

vb_1.png

 

vb_2.png

 

0007.png

 

It has successfully imported your Metin2 Project Virtual Machine!
Congratulations 🙃 !

 

Configure the Virtual Machine

Spoiler

 

Introduction

By default, your Metin2 Project Virtual Machine is partitioned into a local network within your computer. This manipulation consists of making your router and your virtual machine communicate and allowing it access to the Internet network.

 

Ready? Gooo!

 

0007.png

 

You must click on the name of your virtual machine then click on « CONFIGURATION ». A part that is very important, this is where you give your virtual machine the power to connect to the world and control all of us 😱 !

Click on « NETWORK » and choose « BRIDGED ADAPTER » then select the primary network card that your computer uses, « WIFI » or « ETHERNET ». You also have the possibility to modify the various parameters of your virtual machine, such as the RAM, the power of the processor...

 

0008.png

 

Click the « OK » to save the changes.

 

Manage the Virtual Machine

Spoiler

 

Introduction

It's important to know how to manage a virtual machine, starting it and shutting it down are actions that you are likely to perform regularly when managing your Metin2 Project Server.

 

Ready? Gooo!

 

0007.png

 

All you have to do is start your Metin2 Project Virtual Machine 😩 ! For that, it's very simple you have to right click on the name of your virtual machine and it will offer you several choices including: « START » or « CLOSE » when you want to turn it off.

When it has finished starting, you must have this on your screen, you must identify yourself using the identifiers that are available on the topic where you downloaded Metin2 Project, when entering the password it will not be displayed no, this is absolutely normal.

So here you have the main interface between your computer and your virtual machine, it's a bit like your second screen! It must imperatively remain open otherwise it would turn off your computer 🙂 .

 

vb_3.png

 

Trick

It's possible to restart your Metin2 Project Virtual Machine using a command! When you are connected and identified on the VirtualBox interface or using PuTTY, all you have to do is enter the following command then validate with the « ENTER »key on your keyboard:

reboot

 

Retrieve the IP Address

Spoiler

 

Introduction

An IP address is like your postal address, if we don't know it, we can't know where you are. An IP address represents the postal address, the location of your Metin2 Project Virtual Machine on your network.

 

Ready? Gooo!

You will retrieve the address of your virtual machine, it has an address, a home and it does not pay rent! This address, which is exclusively numeric is the IP address, it's specific to each computer, whether physical or virtual. You will be able to connect to the various tools to manage your Metin2 Project private server but also to connect to the game!

 

For that, it's very simple you have to enter the following command in the VirtualBox interface:

ifconfig

In our example, the IP address of the virtual machine is« 192.168.0.21 ».

 

spacer.png

 

Use PuTTY

Spoiler

 

Prerequisites

  • Download the latest version of PuTTY

 

Introduction

PuTTY is an SSH client, it allows you to connect to your FreeBSD Server in SSH. It's more or less similar to a remote control software like AnyDesk or TeamViewer except that it's used in command line! This saves you the uncomfortable interface of VirtualBox. PuTTY being much more ergonomic for copying and pasting commands...

 

Ready? Gooo!

 

001.png

 

  1. Enter the IP address in the field: Host Name (or IP address)
  2. Enter the SSH port in the field: Port (Default: 22)
  3. Enter a name you want in the field: Saved Sessions
  4. Click on the « SAVE » button to save the connection parameters

 

You must double click on the registered server of your choice to initiate a connection. PuTTY will ask you for the username and password of your FreeBSD user, this corresponds to the credentials used on your VirtualBox interface. It may also ask you to confirm the connection to the SSH Server and indicate a security problem, don't panic and click on « YES ».

 

002.png

 

Use EterNexus

Spoiler

 

Prerequisites

 

Introduction

EterNexus is a software which will allow you to decompress and compress the « EIX » and « EPK » archives of the « PACK » folder of your Metin2 Project Client, these archives contain absolutely all the game data, images, texts, models, textures...

 

Ready? Gooo!

You have to extract the files from EterNexus and move them to the « PACK » directory of your Metin2 Project Client. You will find a folder with the same name of the archive that you unzipped in the directory where the archive is located.

To unzip an archive:

 

etx_ext.png

 

EterNexus will recreate a new archive with the same name of the folder and in the same location where the same directory is located.

To compress an archive:

 

etx_pack.png

 

Configure the Metin2 Project Client

Spoiler

 

Prerequisites

  • Download and install the latest version of Notepad++
  • Download and install the latest version of WinRAR

 

Introduction

It's necessary to link your Metin2 Project Client to your Metin2 Project Server, for this we will enter the IP address of your server within the game client configuration.

 

Ready? Gooo!

You must first extract the Metin2 Project Client archive. In order to configure your Metin2 Project Client and link it to your Metin2 Project Virtual Machine, you must configure the IP address within your Metin2 Project Client.

You must extract the archive « ROOT » and you will find a multitude of files there, the one that interests us is « SERVERINFO.PY », it contains all the information about your server, the IP address, the name, the port of access...

 

At the beginning of this file, there is a list of sample servers to guide you through the changes. At the beginning of the file you must find the following block:

SRV_LOCALHOST = {
	'name':'LOCALHOST',
	'host':'127.0.0.1',
	'auth':11002,
	'c1':13001,
	'ids':'10',
}

 

You need to modify the line similar to:

'host':'XXX.XXX.XXX.XXX',

You must replace « XXX.XXX.XXX.XXX » by the IP address of your Metin2 Project Virtual Machine then save the changes. After that, you simply need to compress the « ROOT » archive. This means that when you run the Metin2 Project Client, you will need to select the « LOCALHOST » server.

 

Use Navicat

Spoiler

 

Prerequisites

  • Download and install the latest version of Navicat

 

Introduction

Navicat is a graphical database management and development software suite, it will allow you to manage your databases and the data stored in them. Navicat is not limited to MySQL, it's also able to connect to other SQL Servers such as PostgreSQL, Oracle, SQLite, MariaDB...

As part of Metin2 Project, we use MySQL, the database records and stores all data relating to your Metin2 Project Server, accounts, characters, inventories, state of quests...

 

Ready? Gooo!

To start the configuration of Navicat, you must click on « CONNECTION » then choose « MYSQL », MySQL is the engine of our database used in Metin2 Project.

 

navicat_01.png

 

navicat_02.png

 

Logins are available on the topic where you have downloaded Metin2 Project.

 

  • Enter the name you want in the field: Connection Name
  • Enter the IP address in the field: Host
  • Enter the MySQL port in the field: Port (Default: 3306)
  • Enter the username of a public account in the field: User Name
  • Enter the password associated with your user in the field: Password
  • Check the box: Save password

 

In order to ensure that the connection is established, you can click on the button: « TEST CONNECTION » if you have the message below, everything is good! It only remains to confirm by clicking twice on the buttons: « OK ».

 

navicat_03.png

 

To connect to a MySQL Server, you must double click on the name of the previously added server.

In the left part of Navicat, to see all the data of your Metin2 Project Server you must click on « TABLES ». To open a data table, also double click on it.

 

nv_acc_1.png

 

Create an Account on Metin2 Project

Spoiler

Prerequisites

 

Ready? Gooo!

Creating an account on your Metin2 Project Server is easy, for that we will use Navicat to connect to the MySQL Server. We are going to modify the « ACCOUNT » table, it's located in the « ACCOUNT » database.

 

nv_acc_1.png

 

nv_acc_2.png

 

To manually add an account from Navicat, you must click on the « » at the bottom left and fill in the boxes, these fields are the most important, everything else is optional and will be filled in automatically with the default settings:

 

  • ID: Do not fill, it fills automatically
  • LOGIN: The username of the account we use to connect to the game client
  • PASSWORD: This is the password, which you must first encrypt
  • SOCIAL_ID: This is the code for deleting a character
  • EMAIL: This is the email address of the account
  • CREATE_TIME: Account creation date
  • STATUS: Account status, « OK » or « BLOCK » if he should be banned
  • SECURITYCODE: ?
  • AVAILDT: ?
  • MILEAGE: DC
  • CASH: MD
  • GOLD_EXPIRE: Double Drop Chance for Items
  • SILVER_EXPIRE: 50% More experience
  • SAFEBOX_EXPIRE: More storage space in the Warehouse
  • AUTOLOOT_EXPIRE: A Hand that Automatically Picks Up Yangs
  • FISH_MIND_EXPIRE: The chance of catching a Fish increases
  • MARRIAGE_FAST_EXPIRE: Love points increase faster
  • MONEY_DROP_RATE_EXPIRE: Double Chance of Yang Drop
  • LAST_PLAY: Last login date

This ensures that your passwords are not in the clear in your database, a measure of security and confidentiality. Finish by pressing the « ENTREE » key on your keyboard to confirm and save.

 

Assign « GM » permissions

Spoiler

 

Introduction

Adding permissions to a user involves a lot of responsibility, for this we will use Navicat to connect to the MySQL Server. We are going to modify the « GMLIST » table, it's located in the « COMMON » database.

 

nv_acc_3.png

 

nv_acc_4.png

 

To manually add an account from Navicat, you must click on the « » at the bottom left and fill in the boxes:

 

  • MID: Do not fill, it fills automatically
  • MACCOUNT: The account ID the one to use to connect with the game client
  • MNAME: This is the name of the character, it must be strictly identical, if it's not yet existing, it does not matter, the important thing here is to choose a name that will be that of your character
  • MCONTACTIP: The box is empty by default, however some explanations: this allows the rights to be assigned to an account according to the player's IP address, this prevents someone from connecting to the account to take advantage of the accesses, to be avoided if the player to a dynamic IP address
  • MSERVERIP: The box is on « ALL » by default, however some explanations: this is in the case where you have several Metin2 servers running on the same FreeBSD Server, this allows you to assign access to a particular server, it requires adding the server IP in the « GMHOST » table
  • MAUTHORITY: This is the level of access rights in play, you can check the access level of an order from the sources of Metin2
    • GOD: Limited access
    • HIGH_WIZARD: Limited access
    • WIZARD: Limited access
    • LOW_BIZARD: Limited access
    • IMPLEMENTOR: Full access

 

Finish by pressing the « ENTREE » key on your keyboard to confirm and save. You have defined the accesses, you must reload them, two solutions:

 

  • You have an account with an already existing GM character, you must write this in-game command and disconnect / reconnect the concerned account: « /RELOAD A ».
  • You don't have any GM characters, you have to stop and restart the Metin2 Project Server with the Metin2 Project Shell Manager.

 

At this stage, the server has not started, the next start of the Metin2 Project Server will suffice to update your character's accesses.

 

Use WinSCP

Spoiler

 

Prerequisites

  • Download and install the latest version of WinSCP

 

Introduction

WinSCP is a graphical SFTP client for Windows. It uses SSH and is open source. The purpose of this program is to enable secure copying of files between a local computer and a remote computer. You will use it to transfer files to it.

With WinSCP you will be able to explore the content of your Metin2 Project Virtual Machine as if you were on your computer with Windows and its file explorer. You will find there the files of the FreeBSD operating system, the programs which have been installed, but also, most importantly, the files of our Metin2 Project Server.

 

Ready? Gooo!

When you open the program for the first time, it automatically offers you the connection manager:

 

winscp_1.png

 

  • Enter the IP address in the field: Host name
  • Enter the SSH port in the port number: Port number (Default: 22)
  • Enter Username: root: in the field: Username
  • Enter the password for: root: in the field: Password
  • Click on the button: Save...

 

winscp_3.png

 

  • Enter the name you want in the field: Save session as
  • Check the box: Save password (not recommended)
  • Click on the button: OK

 

To initiate the connection, you must double click on the server you have registered. WinSCP will automatically connect with the username and password that have been registered. It may also ask you to confirm the connection to the SFTP Server and announce a security issue, don't panic, click « YES ».

 

winscp_2.png

 

Start the Metin2 Project Server

Spoiler

 

Prerequisites

 

Introduction

Metin2 Project comes with a powerful program, Metin2 Project Shell Manager. It allows you to manage your Metin2 Project Server with ease!

 

Ready? Gooo!

To invoke it, you need to run this command on PuTTY:

cd /usr/m2_project && sh m2sh.sh

 

20434583.png

 

You have a multitude of options available to you that allow you to manage Metin2 Project as simply as possible. Each time you run the above command, you must choose one of these options by entering it and then validating it with the « ENTER » key on your keyboard.

Enter:

103

 

Ready? Gooo!

Spoiler

 

Introduction

It's time for you to materialize in the virtual and wonderful world of Metin2 Project ❤️ ! Enjoy the great and beautiful Metin2 Project adventure...

 

08083338.png

 

 

Made With ☕ and ❤️
spacer.png

  • Metin2 Dev 75
  • kekw 3
  • Eyes 2
  • Dislove 1
  • Angry 3
  • Not Good 1
  • Sad 1
  • Cry 2
  • Smile Tear 1
  • Think 4
  • Confused 1
  • Scream 4
  • Lmao 2
  • Good 45
  • Love 36
  • Love 155
Link to comment
Share on other sites

  • Management

spacer.png

 

You too? 😱 You want to create a server of our favorite MMORPG?! You will finally be able to make your dream come true 😍 ! This guide is exclusively compatible with Metin2 Project. You are ready? 🙃 Gooo! 😏 Are you a beginner? I suggest you start by creating a server on your computer ➡️ How to create à Metin2 private server on virtual machine.

 

Summary

FreeBSD Environment (Required)
Web Environment (Optional)

 

 

 

This part is essential, it allows you to prepare, configure your Metin2 Project environment on your FreeBSD Server. All the steps are necessary for the proper functioning of Metin2 Project.

 

Install

FreeBSD

Spoiler

 

Prerequisites

  • A dedicated server at the host of your choice: Kimsufi, Scaleway, SoYouStart...
    • Retrieve the IP address of the FreeBSD Server
    • Retrieve the password of the root user or the one that was created
    • Retrieve the SSH connection port if it has not been modified: 22
  • The latest version of FreeBSD that your host can offer you if you have the choice

 

Ready? Gooo!

An installation of FreeBSD differs from one host to another, I suggest you follow the default configuration which is still sufficient. Your host, during the installation may ask you to create a user, other than the root system user.

In order to continue, your host must provide you with several information to connect to your FreeBSD Server using PuTTY, the IP address of the FreeBSD Server, the username and password, and the port for the SSH Server.

 

Use

PuTTY

Spoiler

 

Prerequisites

  • Download the latest version of PuTTY

 

Introduction

PuTTY is an SSH client, it allows you to connect to your FreeBSD Server in SSH. It's more or less similar to a remote control software like AnyDesk or TeamViewer except that it's used in command line! PuTTY being much more ergonomic for copying and pasting commands...

 

Ready? Gooo!

 

001.png

 

  1. Enter the IP address in the field: Host Name (or IP address)
  2. Enter the SSH port in the field: Port (Default: 22)
  3. Enter a name you want in the field: Saved Sessions
  4. Click on the « SAVE » button to save the connection parameters

 

You must double click on the registered server of your choice to initiate a connection. PuTTY will ask you for the username and password of your FreeBSD user, this corresponds to the credentials provided by your host. It may also ask you to confirm the connection to the SSH Server and indicate a security problem, don't panic and click on « YES ».

 

002.png

 

Download

Server

Spoiler

 

Prerequisites

 

Ready? Gooo!

The archive itself is made up of two archives inside: the Metin2 Project Server Files and the Metin2 Project Database. Extract the archive and keep these archives on your computer.

 

Client

Spoiler

 

Prerequisites

 

Ready? Gooo!

The archive itself is made up of three archives inside: the Metin2 Project Tools, the Metin2 Project Client and the Metin2 Project Source Client. Extract the archive and keep these archives on your computer.

 

Configure

Resolv

Spoiler

 

Introduction

This is the resolver library configuration file used to determine, among other things, which DNS Servers your server will use to communicate with the global network.

 

Ready? Gooo!

Connect using PuTTY to your FreeBSD Server then run the following command:

ee /etc/resolv.conf

Add the following configuration:

nameserver 1.1.1.1
nameserver 8.8.4.4
nameserver 8.8.8.8
nameserver 127.0.0.1

Save using the keyboard combination « CTRL + C » then enter:

exit

 

SSH

Spoiler

 

Introduction

We use SSH to connect to the server with PuTTY from the command line or via WinSCP in SFTP for file transfers for example ... We are going to modify the configuration of SSH to allow the root user to connect to it . It's possible that the configuration of your host is the one already described in this guide, in this case, you can ignore the possible modifications. Did your host give you the root user credentials? You can skip this step.

 

Ready? Gooo!

Connect using PuTTY to your FreeBSD Server then run the following command:

ee /etc/ssh/sshd_config

Search:

#PermitRootLogin no

Replace:

PermitRootLogin yes

Save using the keyboard combination « CTRL + C » then enter:

exit

The configuration of the SSH Server is finished, we will restart the SSH service to apply the changes, run the following command:

service sshd restart

Restarting the SSH Service will log out of PuTTY, log back into PuTTY using the root user if you haven't already.

 

PKG

Spoiler

 

Introduction

PKG is a package manager. You can install packages, that is, programs that you can use under FreeBSD. PKG itself is a program. However, during a recent installation of FreeBSD, the package manager may not be enabled or installed by default.

An advantage of PKG is the fact that it automatically installs the dependencies of the programs you want to install! It's possible that the configuration of your host is the one already described in this guide, in this case, you can ignore the possible modifications.

 

Ready? Gooo!

Connect using PuTTY to your FreeBSD Server then run the following command:

pkg -y

If this tells you:

Ignore the mismatch and continue ? [ Y / n ] :

Enter then validate:

y

The package manager is now activated, we will do an update, run the following command:

pkg update

If this tells you:

Ignore the mismatch and continue ? [ Y / n ] :

Enter then validate:

y

 

Débogage

Spoiler

 

Introduction

We are going to configure FreeBSD so that when any « CRASH » program generates a kernel dump file so that we can debug them, the file will have the same name as the program and it will have the extension “.CORE”.

 

Ready? Gooo!

Connect using PuTTY to your FreeBSD Server then run the following command:

ee /etc/sysctl.conf

Add at the end of the file:

kern.coredump=1

Save using the keyboard combination « CTRL + C » then enter:

exit

We will restart your FreeBSD Server, run this command:

reboot

Restarting the FreeBSD Server will result in you disconnecting from PuTTY, wait a few minutes then reconnect to PuTTY.

 

Install

MySQL

Spoiler

 

Introduction

MySQL is a database manager, it's he who saves all the information relating to your accounts, your characters, inventories... It uses what is called the SQL language. Without him we would be nothing! There are other SQL Servers such as PostgreSQL, Oracle, SQLite, MariaDB...

As part of Metin2 Project, the database backs up, stores all data relating to your Metin2 Project Server, accounts, characters, inventories, state of quests...

 

Ready? Gooo!

Connect using PuTTY to your FreeBSD Server then run the following command:

pkg install -y mysql80-server mysql80-client

 

Python

Spoiler

 

Introduction

Python is an interpreted, multi-paradigm, cross-platform programming language. It promotes structured, functional and object-oriented imperative programming. Python is used on the Metin2 Project to compile the game's quests.

 

Ready? Gooo!

Connect using PuTTY to your FreeBSD Server then run the following command:

pkg install -y python27
data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==

 

GMake

Spoiler

 

Introduction

GMake is software that automatically builds files, often executables, or libraries from basic elements such as source code. It uses files called makefiles which specify how to build the target files.

 

Ready? Gooo!

Connect using PuTTY to your FreeBSD Server then run the following command:

pkg install -y gmake
data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==

 

MakeDepend

Spoiler

 

Introduction

MakeDepend is a tool used to generate source file dependencies.

 

Ready? Gooo!

Connect using PuTTY to your FreeBSD Server then run the following command:

pkg install -y makedepend

 

DevIL

Spoiler

 

Introduction

Developer's Image Library (DevIL) is a library for developing applications with very powerful image loading capabilities, easy to learn and use for a developer.

 

Ready? Gooo!

Connect using PuTTY to your FreeBSD Server then run the following command:

pkg install -y devil
data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==

 

GDB

Spoiler

 

Introduction

GNU Debugger, also called GDB, is the standard debugger for the GNU Project. It's used to analyze kernel dumps when a program terminates due to an unhandled error.

 

Ready? Gooo!

Connect using PuTTY to your FreeBSD Server then run the following command:

pkg install -y gdb
data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==

 

LLVM Devel

Spoiler

 

Introduction

CLang is a compiler for the C, C ++, and Objective-C programming languages. Its low-level interface uses LLVM libraries for compilation.

 

Ready? Gooo!

Connect using PuTTY to your FreeBSD Server then run the following command:

pkg install -y llvm-devel
data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==

 

Use

WinSCP

Spoiler

 

Prerequisites

  • Download and install the latest version of WinSCP

 

Introduction

WinSCP is a graphical SFTP client for Windows. It uses SSH and is open source. The purpose of this program is to enable secure copying of files between a local computer and a remote computer. You will use it to transfer files to it.

With WinSCP you will be able to explore the content of your Metin2 Project Virtual Machine as if you were on your computer with Windows and its file explorer. You will find there the files of the FreeBSD operating system, the programs which have been installed, but also, most importantly, the files of our Metin2 Project Server.

 

Ready? Gooo!

When you open the program for the first time, it automatically offers you the connection manager:

 

winscp_1.png

 

  • Enter the IP address in the field: Host name
  • Enter the SSH port in the port number: Port number (Default: 22)
  • Enter Username: root: in the field: Username
  • Enter the password for: root: in the field: Password
  • Click on the button: Save...

 

winscp_3.png

 

  • Enter the name you want in the field: Save session as
  • Check the box: Save password (not recommended)
  • Click on the button: OK

 

To initiate the connection, you must double click on the server you have registered. WinSCP will automatically connect with the username and password that have been registered. It may also ask you to confirm the connection to the SFTP Server and announce a security issue, don't panic, click « YES ».

 

winscp_2.png

 

Configure

MySQL

Spoiler

 

Introduction

Once installed, it's necessary to configure MySQL so that it starts automatically when your FreeBSD Server starts up, configure users and access to databases!

 

Ready? Gooo!

Connect using PuTTY to your FreeBSD Server.

We will configure the automatic start of MySQL when you start your FreeBSD Server, run the following command:

sysrc mysql_enable="YES"

A final configuration in order to be able to use MySQl, run the following command:

ee /usr/local/etc/mysql/my.cnf

Search:

bind-address = 127.0.0.1

Replace:

#bind-address = 127.0.0.1

Save using the keyboard combination « CTRL + C » then enter:

exit

Let's start MySQL using the following command:

service mysql-server start

If you get this message:

Starting mysql...

MySQL is started.

 

Initial setting

Run the following command:

mysql_secure_installation

If you get this message:

VALIDATE PASSWORD PLUGIN can be used to test passwords and improve security. It checks the strength of password and allows the users to set only those passwords which are secure enough. Would you like to setup VALIDATE PASSWORD plugin ?
Press y | Y for Yes, any other key for No :

Enter:

n

If you get this message:

Using existing password for root...
Change the password for root ? ((Press y | Y for Yes, any other key for No) :

Enter:

y

It will ask you for a new password, this is the root user password for MySQL:

New password : 

If you get this message:

Remove anonymous users ? (Press y | Y for Yes, any other key for No) :

Enter:

y

If you get this message:

Disallow root login remotely ? (Press y | Y for Yes, any other key for No) :

Enter:

n

If you get this message:

Remove test database and access to it ? (Press y | Y for Yes, any other key for No) :

Enter:

y

If you get this message:

Reload privilege tables now ? (Press y | Y for Yes, any other key for No) :

Enter:

y

MySQL is configured and the password for the root user has been changed.

 

Create the databases

We need to create the databases so that your Metin2 Project Server can save the information it needs ... Let's get started! We will first connect to MySQL from the command line:

mysql -u root -p

If you get this message:

Enter password :

Enter the password you chose earlier then enter the following commands in the sql interpreter:

CREATE DATABASE account;
CREATE DATABASE common;
CREATE DATABASE player;
CREATE DATABASE log;
CREATE DATABASE hotbackup;

You should get for each run, the following message:

Query OK, 1 row effected (0.00 sec)

 

Create users

MySQL separates access into two types of users:

  • Local ( Localhost ): A local user can connect to the MySQL Server locally and will not be allowed to connect from outside. A local user who tries to connect from outside will have an error indicating that his access is not enabled.

 

  • Public ( % / IP ): A public user can connect to the MySQL Server locally and externally. The use of the user type depends on the level of security you want to implement. You can also define an IP from which the account is allowed to connect, beware of dynamic IPs. The wildcard % will accept all IPs.

 

Run this series of commands, you can customize the password for the public user metin2_2014:

CREATE USER 'metin2_2014'@'localhost' IDENTIFIED WITH mysql_native_password BY '@METIN2!';
CREATE USER 'metin2_2014'@'%' IDENTIFIED WITH mysql_native_password BY 'CHOOSE_YOUR_PASSWORD';

You should get for each run, the following message:

Query OK, 0 rows affected (0.00 sec)

 

Manage permissions

You have your databases, your users, yet they have no rights, they can't do anything! Run this series of commands:

GRANT ALL PRIVILEGES ON account.* TO 'metin2_2014'@'localhost';
GRANT ALL PRIVILEGES ON common.* TO 'metin2_2014'@'localhost';
GRANT ALL PRIVILEGES ON player.* TO 'metin2_2014'@'localhost';
GRANT ALL PRIVILEGES ON hotbackup.* TO 'metin2_2014'@'localhost';
GRANT ALL PRIVILEGES ON log.* TO 'metin2_2014'@'localhost';

GRANT ALL PRIVILEGES ON account.* TO 'metin2_2014'@'%';
GRANT ALL PRIVILEGES ON common.* TO 'metin2_2014'@'%';
GRANT ALL PRIVILEGES ON player.* TO 'metin2_2014'@'%';
GRANT ALL PRIVILEGES ON hotbackup.* TO 'metin2_2014'@'%';
GRANT ALL PRIVILEGES ON log.* TO 'metin2_2014'@'%';

 

 

You should get for each run, the following message:

Query OK, 0 rows affected (0.00 sec)

Run this command to validate the permissions:

FLUSH PRIVILEGES;

You should get the following message:

Query OK, 0 rows affected (0.00 sec)

MySQL configuration is complete, let's quit the sql interpreter:

exit;

 

Use

Navicat

Spoiler

 

Prerequisites

  • Download and install the latest version of Navicat

 

Introduction

Navicat is a graphical database management and development software suite, it will allow you to manage your databases and the data stored in them. Navicat is not limited to MySQL, it's also able to connect to other SQL Servers such as PostgreSQL, Oracle, SQLite, MariaDB...

As part of Metin2 Project, we use MySQL, the database records and stores all data relating to your Metin2 Project Server, accounts, characters, inventories, state of quests...

 

Ready? Gooo!

To start the configuration of Navicat, you must click on « CONNECTION » then choose « MYSQL », MySQL is the engine of our database used in Metin2 Project.

 

navicat_01.png

navicat_02.png

 

Logins are available on the topic where you have downloaded Metin2 Project.

 

  • Enter the name you want in the field: Connection Name
  • Enter the IP address in the field: Host
  • Enter the MySQL port in the field: Port (Default: 3306)
  • Enter the username of a public account in the field: User Name
  • Enter the password associated with your user in the field: Password
  • Check the box: Save password

 

In order to ensure that the connection is established, you can click on the button: « TEST CONNECTION » if you have the message below, everything is good! It only remains to confirm by clicking twice on the buttons: « OK ».

 

navicat_03.png

 

To connect to a MySQL Server, you must double click on the name of the previously added server.

In the left part of Navicat, to see all the data of your Metin2 Project Server you must click on « TABLES ». To open a data table, also double click on it.

 

nv_acc_1.png

 

Import

Databases

Spoiler

 

Introduction

The databases are empty, it's necessary to import the default data from the Metin2 Project Server.

 

Ready? Gooo!

Importing the databases is simple, you have to connect to your MySQL Server using Navicat then open the databases « ACCOUNT »« COMMON »« PLAYER »« LOG »« HOTBACKUP ».

Right click on the database:

 

nav_1.png

Select the SQL file to import:

 

nav_2.png

nav_3.png

nav_4.png

 

Configure

Account

Spoiler

 

Prerequisites

 

Ready? Gooo!

Creating an account on your Metin2 Project Server is easy, for that we will use Navicat to connect to the MySQL Server. We are going to modify the « ACCOUNT » table, it's located in the « ACCOUNT » database.

 

nv_acc_1.png

 

nv_acc_2.png

 

To manually add an account from Navicat, you must click on the « » at the bottom left and fill in the boxes, these fields are the most important, everything else is optional and will be filled in automatically with the default settings:

 

  • ID: Do not fill, it fills automatically
  • LOGIN: The username of the account we use to connect to the game client
  • PASSWORD: This is the password, which you must first encrypt
  • SOCIAL_ID: This is the code for deleting a character
  • EMAIL: This is the email address of the account
  • CREATE_TIME: Account creation date
  • STATUS: Account status, « OK » or « BLOCK » if he should be banned
  • SECURITYCODE: ?
  • AVAILDT: ?
  • MILEAGE: DC
  • CASH: MD
  • GOLD_EXPIRE: Double Drop Chance for Items
  • SILVER_EXPIRE: 50% More experience
  • SAFEBOX_EXPIRE: More storage space in the Warehouse
  • AUTOLOOT_EXPIRE: A Hand that Automatically Picks Up Yangs
  • FISH_MIND_EXPIRE: The chance of catching a Fish increases
  • MARRIAGE_FAST_EXPIRE: Love points increase faster
  • MONEY_DROP_RATE_EXPIRE: Double Chance of Yang Drop
  • LAST_PLAY: Last login date

This ensures that your passwords are not in the clear in your database, a measure of security and confidentiality. Finish by pressing the « ENTREE » key on your keyboard to confirm and save.

 

Assign « GM » permissions

Spoiler

 

Ready? Gooo!

Adding permissions to a user involves a lot of responsibility, for this we will use Navicat to connect to the MySQL Server. We are going to modify the « GMLIST » table, it's located in the « COMMON » database.

 

nv_acc_3.png

 

nv_acc_4.png

 

To manually add an account from Navicat, you must click on the « » at the bottom left and fill in the boxes:

 

  • MID: Do not fill, it fills automatically
  • MACCOUNT: The account ID the one to use to connect with the game client
  • MNAME: This is the name of the character, it must be strictly identical, if it's not yet existing, it does not matter, the important thing here is to choose a name that will be that of your character
  • MCONTACTIP: The box is empty by default, however some explanations: this allows the rights to be assigned to an account according to the player's IP address, this prevents someone from connecting to the account to take advantage of the accesses, to be avoided if the player to a dynamic IP address
  • MSERVERIP: The box is on « ALL » by default, however some explanations: this is in the case where you have several Metin2 servers running on the same FreeBSD Server, this allows you to assign access to a particular server, it requires adding the server IP in the « GMHOST » table
  • MAUTHORITY: This is the level of access rights in play, you can check the access level of an order from the sources of Metin2
    • GOD: Limited access
    • HIGH_WIZARD: Limited access
    • WIZARD: Limited access
    • LOW_BIZARD: Limited access
    • IMPLEMENTOR: Full access

 

Finish by pressing the « ENTREE » key on your keyboard to confirm and save. You have defined the accesses, you must reload them, two solutions:

 

  • You have an account with an already existing GM character, you must write this in-game command and disconnect / reconnect the concerned account: « /RELOAD A ».
  • You don't have any GM characters, you have to stop and restart the Metin2 Project Server with the Metin2 Project Shell Manager.

At this stage, the server has not started, the next start of the Metin2 Project Server will suffice to update your character's accesses.

 

Install

Server

Spoiler

 

Ready? Gooo!

Connect using PuTTY to your FreeBSD Server then run this command:

cd /usr && mkdir m2_project && cd /usr/m2_project

The command carries out the following actions: We move our user to the « USR » directory then we create the « M2_PROJECT » folder then we move our user one last time in it.

On your computer, you have an archive, you are going to transfer Metin2 Server Project.tar to the /usr/m2_project directory of your FreeBSD Server.

Once the transfer is complete, run this command:

tar xvf Serveur Metin2 Project.tar

 

Compile

Server

Spoiler

 

Introduction

Metin2 Project needs to be rebuilt in its new environment. Metin2 Project Shell Manager takes care of all manipulations!

 

Ready? Gooo!

Run this command:

cd /usr/m2_project && sh m2sh.sh

Metin2 Project Shell Manager in its full version.

 

20434583.png

 

Clean

Before starting the compilation of the projects, it's necessary to clean the compiled objects.

On Metin2 Project Shell Manager, enter:

310

Metin2 Project Shell Manager will perform a complete cleanup of the sources of the Metin2 Project Server.

 

210800srcs-clean-3.png

 

Compile

Let's rebuild Metin2 Project, for that, open Metin2 Project Shell Manager:

cd /usr/m2_project && sh m2sh.sh

You will, compile all the projects, one after the other in this order:

310 309 306 305 304 307 308 303 302 301

Enter one option at a time.

 

210800srcs-sql.png

210800srcs-lua.png

210800srcs-libthecore.png

210800srcs-libgame.png

210800srcs-poly.png

210800srcs-cryptopp.png

210800srcs-qc.png

213021srcs-d.png

210604srcs-game.png

 

Use

EterNexus

Spoiler

 

Prerequisites

 

Introduction

EterNexus is a software which will allow you to decompress and compress the « EIX » and « EPK » archives of the « PACK » folder of your Metin2 Project Client, these archives contain absolutely all the game data, images, texts, models, textures...

 

Ready? Gooo!

You have to extract the files from EterNexus and move them to the « PACK » directory of your Metin2 Project Client. You will find a folder with the same name of the archive that you unzipped in the directory where the archive is located.

To unzip an archive:

 

etx_ext.png

 

EterNexus will recreate a new archive with the same name of the folder and in the same location where the same directory is located.

To compress an archive:

 

etx_pack.png

 

Configure

Client

Spoiler

 

Prerequisites

  • Download and install the latest version of Notepad++
  • Download and install the latest version of WinRAR

 

Introduction

It's necessary to link your Metin2 Project Client to your Metin2 Project Server, for this we will enter the IP address of your server within the game client configuration.

 

Ready? Gooo!

You must first extract the Metin2 Project Client archive. In order to configure your Metin2 Project Client and link it to your Metin2 Project Virtual Machine, you must configure the IP address within your Metin2 Project Client.

You must extract the archive « ROOT » and you will find a multitude of files there, the one that interests us is « SERVERINFO.PY », it contains all the information about your server, the IP address, the name, the port of access...

At the beginning of this file, there is a list of sample servers to guide you through the changes. At the beginning of the file you must find the following block:

SRV_LOCALHOST = {
    'name':'LOCALHOST',
    'host':'127.0.0.1',
    'auth':11002,
    'c1':13001,
    'ids':'10',
}

You need to modify the line similar to

'host':'XXX.XXX.XXX.XXX',

You must replace « XXX.XXX.XXX.XXX » by the IP address of your Metin2 Project Virtual Machine then save the changes. After that, you simply need to compress the « ROOT » archive. This means that when you run the Metin2 Project Client, you will need to select the « LOCALHOST » server.

 

Start

Server

Spoiler

 

Prerequisites

 

Introduction

Metin2 Project comes with a powerful program, Metin2 Project Shell Manager. It allows you to manage your Metin2 Project Server with ease!

 

Ready? Gooo!

To invoke it, you need to run this command on PuTTY:

cd /usr/m2_project && sh m2sh.sh

 

20434583.png

 

You have a multitude of options available to you that allow you to manage Metin2 Project as simply as possible. Each time you run the above command, you must choose one of these options by entering it and then validating it with the « ENTER » key on your keyboard.

Enter:

103

 

Ready? Gooo!

Spoiler

 

Ready? Gooo!

It's time for you to materialize in the virtual and wonderful world of Metin2 Project ❤️ ! Enjoy the great and beautiful Metin2 Project adventure...

08083338.png

 

 

 

 

This part is optional, if you want to install forum or a website for your Metin2 Project Server, it's necessary to prepare your web environment on your FreeBSD Server. It's essential to have configured your domain name in order to assign it a type A record to the IP address of your FreeBSD Server! If you don't have a domain name, you are wasting your time.

 

 

Install

Apache

Spoiler

 

Introduction

The free software Apache HTTP Server is an HTTP Server, Apache is an open-source and cross-platform web server.

 

Ready? Gooo!

Connect using PuTTY to your FreeBSD Server then run the following command:

pkg install -y apache24

 

PHP

Spoiler

 

Introduction

PHP Hypertext Preprocessor, known by its acronym PHP, is a free programming language, mainly used to design dynamic web pages through an HTTP Server, but can also function like any language interpreted locally. PHP is an object-oriented imperative language. It can be easily integrated into HTML. We use PHP with its multiple functions in order to be quiet when designing your websites.

 

Ready? Gooo!

Connect using PuTTY to your FreeBSD Server then run the following command:

pkg install -y php74 mod_php74 php74-bcmath php74-bz2 php74-curl php74-dba php74-dom php74-enchant php74-exif php74-extensions php74-fileinfo php74-filter php74-ftp php74-gd php74-gettext php74-gmp php74-imap php74-json php74-ldap php74-lz4 php74-mbstring php74-mysqli php74-odbc php74-opcache php74-openssl php74-pdo php74-pdo_mysql php74-pdo_odbc php74-pdo_pgsql php74-pdo_sqlite php74-pgsql php74-pspell php74-readline php74-session php74-simplexml php74-snmp php74-soap php74-sockets php74-sqlite3 php74-tidy php74-xml php74-xmlreader php74-xmlrpc php74-xmlwriter php74-xsl php74-zip php74-zlib php74-zstd

 

Cerbot

Spoiler

 

Introduction

Let's Encrypt is a certification authority. This authority provides free certificates for the TLS cryptographic protocol by means of an automated process through Certbot, with SSL certificates you can obtain HTTPS on your website.

 

Ready? Gooo!

Connect using PuTTY to your FreeBSD Server then run the following command:

pkg install -y py37-certbot py37-certbot-apache

 

Configure

Apache

Spoiler

 

Introduction

Once installed, it's necessary to configure Apache so that it starts automatically when your FreeBSD Server starts up, configure virtual hosts and general parameters.

 

Ready? Gooo!

Connect using PuTTY to your FreeBSD Server then run the following command:

sysrc apache24_enable="YES"

Let's activate the Apache modules, run the following command:

ee /usr/local/etc/apache24/httpd.conf

Search:

#Include etc/apache24/extra/httpd-vhosts.conf

Replace:

Include etc/apache24/extra/httpd-vhosts.conf

Search:

#LoadModule rewrite_module libexec/apache24/mod_rewrite.so

Replace :

LoadModule rewrite_module libexec/apache24/mod_rewrite.so

Search:

#LoadModule ssl_module libexec/apache24/mod_ssl.so

Replace:

LoadModule ssl_module libexec/apache24/mod_ssl.so

Search:

#ServerName www.example.com:80

Replace:

ServerName 127.0.0.1:80

Save using the keyboard combination « CTRL + C » then enter:

exit

 

PHP

Spoiler

 

Ready? Gooo!

Connect using PuTTY to your FreeBSD Server then run the following command to copy the PHP configuration file:

cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini

Set up PHP for Apache, run the following command:

ee /usr/local/etc/apache24/modules.d/001_mod-php.conf

This file is blank, add this:

<IfModule dir_module>
	DirectoryIndex index.php index.html
    <FilesMatch "\.php$">
    	SetHandler application/x-httpd-php
	</FilesMatch>
    <FilesMatch "\.phps$">
    	SetHandler application/x-httpd-php-source
    </FilesMatch>
</IfModule>

Save using the keyboard combination « CTRL + C » then enter:

exit

 

Cerbot

Spoiler

 

Introduction

We will also enable Certbot for automatic certification of SSL certificates for HTTPS using a routine.

 

Ready? Gooo!

Connect using PuTTY to your FreeBSD Server then run the following command:

sysrc weekly_certbot_enable="YES"

Add the routine by running the following command:

echo "0 0,12 * * * root python -c 'import random; import time; time.sleep(random.random() * 3600)' && certbot renew -q" | tee -a /etc/crontab > /dev/null

 

Virtual Hosts

Spoiler

 

Introduction

An important step in the configuration of your Web Server under FreeBSD, the creation of the virtual hosts. Thanks to these it will be possible to manage many websites on the same server, for example you would like to have your main domain for the website and a subdomain for your forum? Ah well, it's possible! It's essential to have configured your domain name in order to assign it a type A record to the IP address of your FreeBSD Server!

 

Ready? Gooo!

Connect using PuTTY to your FreeBSD Server then run the following command:

ee /usr/local/etc/apache24/extra/httpd-vhosts.conf

Replace the contents of the file with:

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "/usr/local/www/apache24/data/domain.com"
    ServerName domain.com
    ServerAlias www.domain.com
    ErrorLog "/var/log/httpd-domain-com-error-log"
    CustomLog "/var/log/httpd-domain-com-access-log" common
</VirtualHost>

In our configuration we have:

  • ServerAdmin : It corresponds to your email address, it can be displayed if an error occurs on your website
  • DocumentRoot : It corresponds to the root of the website you are creating, modify domain.com by your domain name
  • ServerName : It corresponds to the domain of the website you configured, modify domain.com by your domain name
  • ServerAlias : It corresponds to the alternate domain of the main domain, mainly used to define the www subdomain
  • ErrorLog / CustomLog : These are the error logs and access logs to your web server from a browser, everything is saved

If for example you want a subdomain, add this after the first block:

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "/usr/local/www/apache24/data/subdomain.domain.com"
    ServerName subdomain.domain.com
    ErrorLog "/var/log/httpd-subdomain-domain-com-error-log"
    CustomLog "/var/log/httpd-subdomain-domain-com-access-log" common
</VirtualHost>

In our configuration what changes?

  • DocumentRoot : It corresponds to the root of the website you create, modify subdomain.domain.com by your subdomain name!
  • ServerName : It corresponds to the domain of the website you configured, modify subdomain.domain.com by your subdomain name!

Save using the keyboard combination « CTRL + C » then enter:

exit

We are going to create the directories of our websites according to the domain name: understand that the directories below are the roots of your websites, this is where you will have to install your websites!

mkdir /usr/local/www/apache24/data/domain.com
mkdir /usr/local/www/apache24/data/subdomain.domain.com

Then we will give back what belongs to Apache, its directories:

chown -R www:www /usr/local/www/apache24/data

Restart Apache:

service apache24 restart

If you get this message:

Performing sanity check on apache24 configuration :
Syntax OK
Starting apache24...

Congratulations...

 

HTTPS Certification

Spoiler

 

Introduction

HTTPS was invented in order to meet the integrity and confidentiality needs of the data exchanged and especially the authentication of the server. HTTPS is then useful to prevent the theft of information on the website by malicious third parties.

When an Internet user visits an unsecured website with his browser, he will see the word unsecured in red in the address bar. This warning could encourage him to fear the website and to leave it to visit another ... It's important to provide your domain name with a security certificate.

We will be using Certbot by Let's Encrypt. Let's Encrypt is a certificate authority launched on December 3, 2015. This CA provides free X.509 certificates for the TLS cryptographic protocol through an automated process.

 

Ready? Gooo!

Connect using PuTTY to your FreeBSD Server then run the following command:

certbot --apache

When using Certbot for the first time, you should obtain:

Enter email address ( used for urgent renewal and security notices ) ( Enter 'c' to cancel ) :

You must enter an email address, Let's Encrypt warns you if a problem occurs with your certificate or its validity.

Please read the Terms of Service at [...] order to register with the ACME server [...]
( A ) gree / ( C ) ancel :

Enter:

a

If you get this message:

Would you be willing to share your email address [...] and ways to support digital freedom.
( Y ) es / (N ) o :

Enter:

n

If you get this message:

Which names would you like to activate HTTPS for ?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 : domain.com
2 : subdomain.domain.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and / or spaces, or leave input
blank to select all options shown  (Enter 'c' to cancel ) :

Enter the number corresponding to the domain to be certified:

1

or

2

If you get this message:

Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 : No redirect - Make no further changes to the webserver configuration.
2 : Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new websites, or if you're confident your website works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [ 1 - 2 ] then [ enter ] ( press 'c' to cancel ) :

Indeed, automatic redirection from HTTP to HTTPS is recommended, enter:

2

You must obtain:

Obtaining a new certificate
Performing the following challenges:
http-01 challenge for domain.com
Waiting for verification...
Cleaning up challenges

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /usr/local/etc/letsencrypt/live/domain.com/fullchain.pem
   Your key file has been saved at:
   /usr/local/etc/letsencrypt/live/domain.com/privkey.pem
   Your cert will expire on 2099-12-31. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot
   again. To non-interactively renew *all* of your certificates, run
   "certbot renew"
 - Your account credentials have been saved in your Certbot
   configuration directory at /usr/local/etc/letsencrypt. You should
   make a secure backup of this folder now. This configuration
   directory will also contain certificates and private keys obtained
   by Certbot so making regular backups of this folder is ideal.
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

You must repeat the certification for each domain name.

 

Use

World Wide Web

Spoiler

 

Introduction

The goal is to show you where the root directories of your websites are.

 

Ready? Gooo!

In our example, we have created a main domain and a subdomain:

domain.com

/usr/local/www/apache24/data/domain.com

subdomain.domain.com

/usr/local/www/apache24/data/subdomain.domain.com

You must place there, in these directories: your forum, website ... It's the root document of each of your virtual hosts. The configuration of a forum, of a website being specific to each application, will not be specified in this guide.

 

 

 

 

Made With ☕ and ❤️
spacer.png

  • Metin2 Dev 38
  • Dislove 1
  • Sad 2
  • Smile Tear 1
  • Think 2
  • Confused 2
  • Good 38
  • Love 10
  • Love 95
Link to comment
Share on other sites

Hey, first of all thanks for the awesome guide, it was really simple to follow around and interesting for someone that has never worked with this stuff before!

I have an issue that I couldn't solve by googling and looking for some solution, maybe this is something that someone already encountered before.
I followed everything up until the compiling part with m2sh, everything compiles without any issue but when I get to compile DB (302) and GAME (301) that throw those errors respectively:


spacer.png

spacer.png

So, those are probably newbie errors but I'm pretty much a beginner so I am not really sure what's wrong 😪

I am running FreeBSD 12.1-RELEASE on an OVH VPS.

I tried just for the sake of doing it to still start the server after those errors, the procedure seemed to work (not throwing any errors) but the client was stuck at connecting to the server (I configured the IP), so I assume that this is because of those errors.

Some help would be really appreciated, thanks already!

Edited by Metin2 Dev
Core X - External 2 Internal
  • Sad 1
  • Good 2
  • Love 1
Link to comment
Share on other sites

  • Management
17 minutes ago, DLP23 said:

Hey, first of all thanks for the awesome guide, it was really simple to follow around and interesting for someone that has never worked with this stuff before!

I have an issue that I couldn't solve by googling and looking for some solution, maybe this is something that someone already encountered before.
I followed everything up until the compiling part with m2sh, everything compiles without any issue but when I get to compile DB (302) and GAME (301) that throw those errors respectively:


spacer.png

spacer.png

So, those are probably newbie errors but I'm pretty much a beginner so I am not really sure what's wrong 😪

I am running FreeBSD 12.1-RELEASE on an OVH VPS.

I tried just for the sake of doing it to still start the server after those errors, the procedure seemed to work (not throwing any errors) but the client was stuck at connecting to the server (I configured the IP), so I assume that this is because of those errors.

Some help would be really appreciated, thanks already!

I think you forgot to compile a library

cd /usr/m2_project/ && sh m2sh.sh

Then enter:

304

It will have to compile the libgame library.
Then to be sure:

cd /usr/m2_project/ && sh m2sh.sh

Then enter:

311

To clean up the game and the db.
You can then recompile the game and the db with 301 and 302.

Edited by Metin2 Dev
Core X - External 2 Internal
  • Sad 1
  • Good 3
  • Love 4
Link to comment
Share on other sites

5 hours ago, ASIKOO said:

I think you forgot to compile a library


cd /usr/m2_project/ && sh m2sh.sh

Then enter:


304

It will have to compile the libgame library.
Then to be sure:


cd /usr/m2_project/ && sh m2sh.sh

Then enter:


311

To clean up the game and the db.
You can then recompile the game and the db with 301 and 302.

That was the problem (and a stupid one as well) indeed 🤣
Everything is working, thank you a lot again!

  • Sad 1
  • Good 1
  • Love 1
Link to comment
Share on other sites

  • Management
16 minutes ago, DLP23 said:

That was the problem (and a stupid one as well) indeed 🤣
Everything is working, thank you a lot again!

Perfect! :) 

Please feel free to write on this topic if you have any problems.
I haven't done a lot of testing, I'm waiting for feedback to improve the server files!

  • Metin2 Dev 1
  • Sad 1
Link to comment
Share on other sites

On 3/22/2021 at 12:06 AM, ASIKOO said:

Perfect! :) 

Please feel free to write on this topic if you have any problems.
I haven't done a lot of testing, I'm waiting for feedback to improve the server files!

Hello there, i recently found this forum and i am really glad that i did. For years now i am trying to make my own project server but i stuck back in 2017 with the daroo files and the logmein hamachi situation.

I want to make a question: "If i run a vm on a local server and modify the client, is it possible to use this client on a dedicated server later?"

Edited by CoalKid
  • Metin2 Dev 1
  • Sad 1
Link to comment
Share on other sites

  • Management
Just now, CoalKid said:

Hello there, i recently found this forum and i am really glad that i did. For years now i am trying to make my own project server but stuck buck in 2017 with the daroo files and the logmein hamachi situation.

I want to make a question: "If i run a vm on a local server and modify the client, is it possible to use this client on a dedicated server later?"

Yes.

  • Sad 1
  • Good 1
Link to comment
Share on other sites

1 hour ago, CoalKid said:

Failed to open a session for the virtual machine Metin2 Project.

Nonexistent host networking interface, name 'Intel(R) Ethernet Connection (2) I219-V' (VERR_INTERNAL_ERROR).

Result Code:E_FAIL (0x80004005)

Component:ConsoleWrap

Interface:IConsole {872da645-4a9b-1727-bee2-5585105b9eed}

????

Open settings for your machine in VirtualBox with (wm must be close)

Go to Network

see this (remove spaces) :

Replace with your network card and Save

Start virtual machine and enjoy.

Spoiler

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 3
  • Confused 1
  • Good 4
  • Love 2
  • Love 1
Link to comment
Share on other sites

1 minute ago, CjMt2 said:

Open settings for your machine in VirtualBox with (wm must be close)

Go to Network

see this (remove spaces) :

Replace with your network card and Save

Start virtual machine and enjoy.

I already fixed that tbh, thank you anyway. Now there seems to be a problem with the Database connection. (1045-Access denied for user root)

Spoiler

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 2
  • Good 1
Link to comment
Share on other sites

On 3/27/2021 at 1:55 PM, CoalKid said:

I already fixed that tbh, thank you anyway. Now there seems to be a problem with the Database connection. (1045-Access denied for user root)

1. connect to mysql server with putty in standard console

2. create user from any host in mysql console

3. create rigts for user in mysql console

4. make sure the user has active privileges in mysql console

5. exit from mysql server in mysql console

6. back to standard putty console

Be careful:

'databasename' is the name of your database, repeat this for account, common, hotbackup, log, metin2_runup, player, etc.

'username' is the username of your MySQL or MariaDB user account

'password' is the password required for that username

 

1. $ mysql -u root -p

2. mysql> CREATE USER 'username'@'%' IDENTIFIED BY 'password';
3. mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES ON databasename.* TO 'username'@'%' IDENTIFIED BY 'password';
4. mysql> FLUSH PRIVILEGES;
5. mysql> QUIT;
6. $

 

Edited by CjMt2
add content
  • Not Good 1
  • Love 1
Link to comment
Share on other sites

  • Management
Link to comment
Share on other sites

  • Management
Just now, Morfeus said:

Can i use this install for other serverfiles?

Yes, if the server files are updated.

  • Sad 1
Link to comment
Share on other sites

On 4/2/2021 at 11:21 PM, Morfeus said:

https://metin2.download/picture/g5Ky8P41UZBXIs7EF7FdGH7criz0zsLH/.png i get this error. I gived all grants in mysql, pass etc. chmod -R 777 mysql and game but i get this error.

In /var/db/mysql/name_of_host.err you have all errors from MySQL server

Edited by Metin2 Dev
Core X - External 2 Internal
  • Sad 1
  • Scream 1
  • Good 1
Link to comment
Share on other sites

cd /usr/m2_project/2014.1/srcs/server/db/src && gmake clean && gmake depend && gmake db && ls ../../../output
...
       [ GENERATING ] db_debug
ld: error: unable to find library -lsql
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake: *** [Makefile:88: ../../../output/db_debug] Error 1

Tis is after import Virtual Machine - Kraizy Updated Edition.ova image and change only to static ip and keyboard in rc.conf , root pwd .

 

With CC = clang++-devel I have ld:error but with CC = c++ I have

       [ GENERATING ] db_debug
       [ GENERATING ] db_stripped

 

Edited by CjMt2
fix
Link to comment
Share on other sites

Hey I followed the tutorial, and whenever I try to start the server (103) using the Metin2 Project Shell Manager, after its suposed to be started, I try to check state (402) and I get this:

State Printscreen

Am I missing something ? I'm pretty sure I followed all the steps correctly, but the server doest not start and the logs are all empty.

 

EDIT:

I also tried to manually execute the commands from  Metin2 Project Shell Manager, starting with booting the db, and I get teh following error:

Database start error

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 5
  • Sad 2
  • Think 2
  • Good 5
  • Love 3
  • Love 3
Link to comment
Share on other sites

14 minutes ago, Wooz said:

Hey I followed the tutorial, and whenever I try to start the server (103) using the Metin2 Project Shell Manager, after its suposed to be started, I try to check state (402) and I get this:

State Printscreen

Am I missing something ? I'm pretty sure I followed all the steps correctly, but the server doest not start and the logs are all empty.

 

EDIT:

I also tried to manually execute the commands from  Metin2 Project Shell Manager, starting with booting the db, and I get teh following error:

Database start error

 

So, db source not compile and existent db is unusable .... hmmm ... this files is trash?

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

27 minutes ago, Wooz said:

Hey I followed the tutorial, and whenever I try to start the server (103) using the Metin2 Project Shell Manager, after its suposed to be started, I try to check state (402) and I get this:

State Printscreen

Am I missing something ? I'm pretty sure I followed all the steps correctly, but the server doest not start and the logs are all empty.

 

EDIT:

I also tried to manually execute the commands from  Metin2 Project Shell Manager, starting with booting the db, and I get teh following error:

Database start error

 

Ok I managed to fix it.

I just  cleaned and recompiled all the source using  Metin2 Project Shell Manager commands, and the server started OK.
Must be something with this VM Image not having everything correctly compiled.

Should add this information to the tutorial, or upload a new VM Image @ASIKOO.

Edited by Metin2 Dev
Core X - External 2 Internal
  • Good 2
  • Love 1
Link to comment
Share on other sites

  • Management
43 minutes ago, CjMt2 said:

Is there a simple sha registration form (php script) suitable with mysql 8 from this server?

 

UPPER(CONCAT('*', SHA1(UNHEX(SHA1(___my___password___)))))

you can use this instead of the old PASSWORD() function.
I don't have a full page.

On 4/4/2021 at 7:08 PM, Wooz said:

Ok I managed to fix it.

I just  cleaned and recompiled all the source using  Metin2 Project Shell Manager commands, and the server started OK.
Must be something with this VM Image not having everything correctly compiled.

Should add this information to the tutorial, or upload a new VM Image @ASIKOO.

I had to forget to recompile everything... Thank you I will correct in the next version.

  • Love 2
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.