EN shard

From Ryzom Forge Wiki

Jump to: navigation, search

Migration

Please use the migrated document at URL shown below.

Migrated to en:shard at 2018-06-24

Flag-DE

Übersetzung , bitte.

Flag-EN

To check the quality of the text itself

Flag-ES

Traducción, por favor.

Flag-RU

перевод, пожалуйста.


Ryzom Wiki: Ryzom Commons | DE • EN • ESFRRU | Ryzom Forge

Installing the shard

The shard means an instance of the game server based on the Ryzom Core system. This tutorial was compiled from notes from RC wiki ((for info : [ryzomcore originale])).

The installation of the shard is under Linux, with dedicated user, which we call here "compil" and windows:


 adduser compil
 adduser compil sudo
 su - compil

Installation packages and sources

Tests were made on:

  Ubuntu 15.04
  Debian 7
  Debian 8
  Windows (tuto not finish)

Last days of information and packages for linux:

 sudo apt-get update
 sudo apt-get dist-upgrade
    • Last days of information and packages for linux: **
  reboot
    • You need to install tools and libs to compile and start the server (MySQL root MySQL root password should be set and used later to connect to phpmyadmin).**

=> Install packages:

 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

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

Debian 8

 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-turbo-dev rrdtool bison libxmu-dev autoconf automake libmysqlclient-dev libgif-dev libgif-dev cpputest libssl-dev liblzma-dev

Install Squish

 wget -c https://libsquish.googlecode.com/files/squish-1.11.zip
 unzip  squish-1.11.zip 
 cd squish-1.11
  • Important: the source code of the library "squish" does not compile with the latest versions of gcc. We must make a minor correction before starting this compilation:** \\

In « alpha.cpp » (line 24) and « singlecolourfit.cpp » (line 26), add :

 #include <limits.h>


And compile:

 make
 sudo make install


For Windows :

Install in order DirectX SDK and Visual C ++

 7-Zip
 Installer le DirectX SDK
 Installer le Visual c++ 2010
 Tortoise Git
 CMake
 Qt 4.8.6 pour VC++ 2010

Ryzom download source code and data:

 hg clone https://bitbucket.org/ryzom/ryzomcore
 cd ryzomcore
 hg checkout develop
 hg clone https://bitbucket.org/ryzom/ryzomcore-data

Missing files :

 sudo apt_get install git
 git clone https://git.khaganat.net/khaganat/khanat-ressources.git

For windows  : Download

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

Build Ryzom OpenShard serveur

create a file with variables for linux

For a script :

 nano /home/compil/.bashrc
 export RYHOME=/home/compil/ryzomcore/code
 export RYZOM_PATH=/home/compil/ryzomcore/code/ryzom
 export PATH=$PATH:/home/compil/ryzomcore/code/ryzom/tools/scripts/linux
 export RYDATA=/home/compil/ryzomcore-data

The configuration option to build only nel & server (In static: if CMakeOptions)

For linux :

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

For windows :

  Create a "build" directory to the "code"

CMake line to launch in build:

 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 ..

For Windows :

 Start Cmake :
 Code source : C:/ryzomcore/code
 Build binaires : C:/ryzomcore/code/build
 Configure pour visual c++ 2010
 Configuring 
 Change options
 Generate

Build and install

For linux :

 make -jX  
 sudo make install 

For Windows :

 Start C:\ryzomcore\code\build\RyzomCore.sln that was generated
by choosing Visual C++ press  F7 pour compile

Symlinks for the system to see the data

 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 datasheets

Compile sheet_id.bin

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

Compile visual_slot.tab

First, verify that the paths to the directory containing the datasheets ( leveldesign ) primitives ( primitive ) and common files to the server and the client ( common ) are good 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

current state of our sheets_packer.cfg file

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

Then we can start the sheets_packer, staying in the directory where it was because .cfg file paths are relative:

 .$RYHOME/build/bin/sheets_packer

Finally, copy visual_slot.tab in its place

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

Add missing languages

 for var in $RYDATA/translation/translated/*_en.txt; do  nomfic=${var##*/}; ln -s $nomfic ${var%/*}/${nomfic/_en/_fr}; done
 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

Configure serveur

  • Éditer différents fichiers pour trouver la configuration du serveur :
 nano $RYZOM_PATH/server/frontend_service.cfg

Edit different files to find the server configuration: FSListenHost = "your.server.ip.adress";

 nano $RYZOM_PATH/server/sql.cfg

To edit depending on your configuration:

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

eave localhost. Create a "nel" user has the rights to its database, and a "ring" user, each with its password. Fill $ RYZOM_PATH / server / sql.cfg with this information.

Web-admin

Install paquets web server

 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 a "ryzomweb" folder and copy it:

 cp -r $RYHOME/web ryzomweb
 chmod -R a+w ryzomweb
 sudo chown -R www-data:www-data ryzomweb

Configuring Apache 2 Web Server and 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 votreadresss.ip
       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 votreadress.ip
       ServerAdmin admin@localhost
       DocumentRoot /home/compil/ryzomweb/public_php
       ErrorLog ${APACHE_LOG_DIR}/error.log
       CustomLog ${APACHE_LOG_DIR}/access.log combined
 </VirtualHost>

Open port 40916

 nano /etc/apache2/ports.conf

Add :

 Listen 40916

Restart the service Apache

 service apache2 restart

Install web-admin

Go to : http://VOTRE_ADRESSE_IP/setup

Follow the instructions.


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

To help you fill it:

https://khaganat.net/wikhan/fr:shard_database


Installer le patch (optionnelle)

Installing Patches Server is explained in detail on a dedicated page :

 https://khaganat.net/wikhan/fr:installation_d_un_serveur_de_patchs

Start the Shard

  • to turn on the shard:
 shard start
  • To navigate in and out of screen:
 ctrl + a + n (or ctrl + a + the number of the service) allows navigate between services
 Ctrl + a + d let out of screen 
 Shard join venture to reach a lit shard
 shard share allows to reach a shard lit several
  • To turn off the shar:
 shard stop

Check that all works without customer

 http://votreadress.ip:40916/login/r2_login.php?cmd=login&login=yourlogin&password=pwd&clientApplication=ryzom
 yourlogin = your user
pwd = your passwords

Reference :

 https://ryzomcore.atlassian.net/wiki/display/RC
 https://khaganat.net/wikhan/fr:shard