Logo Khaganat
This translation is older than the original page and might be outdated. See what has changed.
Translations of this page?:

Installing the shard

The shard refers to an instance of the game server based on the Ryzom Core system. This tutorial is based on notes from the RC wiki((For info: https://ryzomcore.atlassian.net/wiki/page ryzomcore original).

It remains to detail the deployment of AMS (Account Management System)

First of all, make sure you have a well-configured database: 1st_server_states

The installation of the shard is done under Linux, with the dedicated user name: “compil”:

adduser compil
adduser compil sudo
su - compil

Installing packages and sources

Tests have been made on:

Updating information and packages for linux:

To use php7 (7.3) you need to manually install mcrypt additionally, which is very well explained on: Tutorial for mcrypt on php7.3 or php7.2

sudo apt-get update
sudo apt-get dist-upgrade

If the kernel is updated at this point, you must restart:

 reboot

You need to install tools and libs to compile and start the server(the MySQL root Root MySQL password must be set and will later be used to connect to phpmyadmin).

⇒ Install packages from LAMP:

apt-get install apache2 php5 mysql-server libapache2-mod-php5 php5-mysql apache2-utils php5-gd php5-imagick

Ubuntu

sudo apt-get install git libcurl4-openssl-dev libluabind-dev libfreetype6-dev libx11-dev libgl1-mesa-dev libxxf86vm-dev libxrandr-dev libxrender-dev libopenal-dev libogg-dev libvorbis-dev libxml2-dev cmake build-essential libpng12-dev libjpeg62-dev rrdtool libmysqlclient18-dev bison libxmu-dev autoconf automake libcpptest-dev libgif-dev cpputest libssl-dev unzip

Debian 7

sudo apt-get install git libcurl4-openssl-dev libluabind-dev libfreetype6-dev libx11-dev libgl1-mesa-dev libxxf86vm-dev libxrandr-dev libxrender-dev libopenal-dev libogg-dev libvorbis-dev libxml2-dev cmake build-essential libpng12-dev libjpeg62-dev rrdtool bison libxmu-dev autoconf automake libmysqlclient-dev libgif-dev libgif-dev cpputest libssl-dev unzip

Debian 8

udo apt-get install git libcurl4-openssl-dev libluabind-dev libfreetype6-dev libx11-dev libgl1-mesa-dev libxxf86vm-dev libxrandr-dev libxrender-dev libopenal-dev libogg-dev libvorbis-dev libxml2-dev cmake build-essential libpng12-dev libjpeg62-turbo-dev rrdtool bison libxmu-dev autoconf automake libmysqlclient-dev libgif-dev cpputest libssl-dev liblzma-dev unzip

Installer Squish

wget -c https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/libsquish/squish-1.11.zip
unzip  squish-1.11.zip 
cd squish-1.11

Important: the source code of the “squish” library does not compile with the latest versions of gcc. A minor correction must be made before running this compilation:
In “alpha.cpp”(line 24) and “singlecolourfit.cpp”(line 26), you must add:

#include <limits.h>

Then compile:

make
sudo make install

For Windows:

Install in order DirectX SDK then Visual c ++

Download ryzom source code and data:

git clone https://git.khaganat.net/khaganat/mmorpg_khanat/khanat-opennel-code.git


git clone https://git.khaganat.net/khaganat/mmorpg_khanat/khanat-ressources.git

For additional windows:
Download

 +-- code
    |   |
    |   +-- nel
    |   |
    |   +-- ryzom
    |   |
    |   +-- ...
    |
    +-- external

Build Ryzom OpenShard server

Create a file with PATH variables(for linux)

For a permament script:

nano /home/compil/.bashrc

For a script to run at each session:

nano shard.sh

Variables to put in your script:

export RYHOME=/home/compil/khanat-opennel-code/code
export RYZOM_PATH=/home/compil/khanat-opennel-code/code/ryzom
export PATH=$PATH:/home/compil/khanat-opennel-code/code/ryzom/tools/scripts/linux
export RYDATA=/home/compil/khanat-ressources

Configuration options to build only "nel & server"(In static: if CMakeOptions)

For linux:

mkdir $RYHOME/build && cd $RYHOME/build

For windows:

Create the directory "build" in the directory "code".

CMake Line:

cmake -DWITH_NEL_TESTS=OFF -DWITH_RYZOM_CLIENT=OFF -DWITH_NEL=ON -DWITH_STATIC=ON -DWITH_STATIC_DRIVERS=ON -DWITH_DRIVER_OPENGL=OFF -DWITH_DRIVER_OPENAL=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_SOUND=OFF ..

Note that the server must be compiled with the option: -DWITH_SYMBOLS=ON to have debug symbols(see Debugging the shard)

Options:

Without tools: 
-DWITH_RYZOM_TOOLS=OFF (Needed for the shard to be able to make the visual_slot.tab and patches).
-DWITH_NEL_TOOLS=OFF

For Windows:

Launch Cmake:
  * Code source : C:/khanat-opennel-code/code
  * Build binaries: C:/khanat-opennel-code/code/build
  * Configure for visual c++ 2015
   * Configure
   * Change options
   * Generate

Build and install

For linux :

make -jX  (X= nombres de coeur +1, si ça plante n'utiliser que "make")
sudo make install 

For Windows :

Run C:\khanat-opennel-code\code\build\RyzomCore.sln that was generated
By choosing Visual C++,  press F7 to compile.
ln -s $RYDATA/collisions $RYZOM_PATH/server/
ln -s $RYDATA/leveldesign $RYZOM_PATH/server/
ln -s $RYDATA/primitives $RYZOM_PATH/server/
ln -s $RYDATA/translation $RYZOM_PATH/server/
ln -s $RYDATA/continents $RYZOM_PATH/server/
ln -s $RYDATA/common $RYZOM_PATH/server/
ln -s $RYDATA/shard/su/dev_gm_names.xml $RYZOM_PATH/server/data_shard
ln -s $RYDATA/shard/su/invalid_entity_names.txt $RYZOM_PATH/server/data_shard
ln -s $RYDATA/shard/su/reserved_names.xml $RYZOM_PATH/server/data_shard
ln -s $RYDATA/shard/egs/game_event.txt $RYZOM_PATH/server/data_shard
ln -s $RYDATA/shard/egs/mission_queues.txt $RYZOM_PATH/server/data_shard
ln -s $RYDATA/shard/egs/named_items.txt $RYZOM_PATH/server/data_shard

Recompile data from datasheets

Compiler sheet_id.bin

These steps(recompiling the datasheets) require some in depth knowledge of the process and how to manage the files.
If you are an beginner, you can/should safely ignore the steps for know and just jump to the “Configure server” part in the guide!!

Note: Zatalyz and scoui had success.

cd $RYHOME/build/bin
./make_sheet_id -o$RYDATA/leveldesign/game_elem/sheet_id.bin $RYDATA/leveldesign/game_elem $RYDATA/leveldesign/game_element $RYDATA/leveldesign/world $RYDATA/leveldesign/ecosystems $RYDATA/sound

Compiling the visual_slot.tab file

First, verify that the paths to the directorys containing the leveldesign, primitives and the common files(for the server and the client) are correctly found in the configuration file:

cd $RYHOME/build/bin
cp sheets_packer $RYZOM_PATH/tools/sheets_packer/
cd $RYZOM_PATH/tools/sheets_packer
nano sheets_packer.cfg

Default state of the file sheets_packer.cfg file:

/////////////////////////////////
/////////////////////////////////
/// SHEETS PACKER CONFIG FILE ///
/////////////////////////////////
/////////////////////////////////
DataPath = { "../../common/data_leveldesign", "../../common/data_common", "../../client/data", "../../../../../khanat-ressources/common", "../../../../../khanat-ressources/leveldesign", "../../../../../khanat-ressources/primitives" };
WorldSheet = "ryzom.world";
PrimitivesPath = "../../../../../khanat-ressources/primitives";
OutputDataPath = "../../client/data";
LigoPrimitiveClass = "world_editor_classes.xml";

Then we can launch the sheets_packer, remaining in the standing directory of the “.cfg file” because of the relative paths:

$ $RYHOME/build/bin/sheets_packer

Finally, copy the visual_slot.tab to it's needed place:

cp visual_slot.tab $RYZOM_PATH/common/data_common/visual_slot.tab

Add the missing languages

This is a hack to add some translation files strangely requested by IOS. You should find out how to delete these calls that are hardcoded in: code/ryzom/server/src/input_output_service/string_manager.h lines 54 to 67:

class CStringManager
{
public:
	/// This is a list of available languages.
	enum TLanguages
	{
		work,
		english,
		german,
		french,
		russian,
		spanish,
		NB_LANGUAGES
	};
for var in $RYDATA/translation/translated/*_en.txt; do  nomfic=${var##*/}; ln -s $nomfic ${var%/*}/${nomfic/_en/_de}; done
for var in $RYDATA/translation/translated/*_en.txt; do  nomfic=${var##*/}; ln -s $nomfic ${var%/*}/${nomfic/_en/_es}; done
for var in $RYDATA/translation/translated/*_wk.txt; do  nomfic=${var##*/}; ln -s $nomfic ${var%/*}/${nomfic/_wk/_ru}; done

If you are missing out on the French translations(and you want them), you must add:

for var in $RYDATA/translation/translated/*_en.txt; do  nomfic=${var##*/}; ln -s $nomfic ${var%/*}/${nomfic/_en/_fr}; done

Configure Server

Edit different files for proper(and working) server configuration:

nano $RYZOM_PATH/server/frontend_service.cfg

The line to be edited in frontend_service.cfg is:
FSListenHost = “your.server.ip.adress”;

For us it is:
FSListenHost = “lirria.khaganat.net”;

nano $RYZOM_PATH/server/sql.cfg

To edit accordingly to your configuration:

DBHost = "127.0.0.1";
DBRingName = "ring_mini01";

Leave it to localhost. Create the user “nel” who has rights to the complete database, and then a user “ring” with rights to db: ring_mini01, both users with there own passwords. Don't forget to edit $ RYZOM_PATH/server/sql.cfg with your chosen configuration.

Web-admin

Installing web server packages

apt-get install mysql-server apache2 php5 php5-mysql php5-gd rrdtool screen mcrypt php5-mcrypt

apt-get install phpmyadmin

adduser compil www-data

Create, copy and set rights to "ryzomweb":

cp -r $RYHOME/web ryzomweb

chmod -R a+w ryzomweb
sudo chown -R www-data:www-data ryzomweb

Configure Apache2 Web Server & MySQL Database

nano /etc/apache2/sites-available/000-default.conf
<VirtualHost *:80>
<Directory "/home/compil/ryzomweb/">
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
        DirectoryIndex index.php
        AddType text/html .php .phps
        AddHandler application/x-httpd-php .php
        AddHandler application/x-httpd-php-source .phps
</Directory>
        ServerName lirria.khaganat.net

        ServerAdmin webmaster@localhost
        DocumentRoot /home/compil/ryzomweb/public_php/

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

<VirtualHost *:40916>
<Directory "/home/compil/ryzomweb/">
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>
        ServerName lirria.khaganat.net

        ServerAdmin admin@localhost
        DocumentRoot /home/compil/ryzomweb/public_php

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Open the port 40916!

nano /etc/apache2/ports.conf

Add:

Listen 40916

Restart the Apache web service

service apache2 restart

Install the web-admin

Go to: http://YOUR_IP_ADRESS/setup

Follow the instructions.

If you want to manage your MySQL database, go to: http://YOUR_ADRESSE_IP/phpmyadmin

Helpful information about editing the database:

''Https://khaganat.net/wikhan/shard_database''

Install the patch service(optional)

The installation of the Patch Server is explained in detail on a specially dedicated page: https://khaganat.net/wikhan/en:installation_d_un_serveur_de_patchs

Start the Shard

To turn on the shard:

shard start

To navigate and exit screen:

Ctrl + a + n (or ctrl + a + service digit) allows you to navigate between services.
Ctrl + a + d allows you to exit screen.

Shard join allows to join an already running shard.
Shard share allows to join several running shards.

To turn off the shard:

shard stop

Verify that all works without a client

Http://lirria.khaganat.net:40916/login/r2_login.php?cmd=login&login=sonlogin&password=mdp&clientApplication=Lirria

Sonlogin = your user

Mdp = your passwords

computer server shard tutorial

CC Attribution-Share Alike 4.0 International Driven by DokuWiki
en/shard.txt · Last modified: 2021/12/03 18:19 by 127.0.0.1

Licences Mentions légales Accueil du site Contact