Logo Khaganat
Translations of this page?:

Game server installation trace

I'm starting from zero here ←- Does not exist!!

Installing dependencies

First, we add the deposit of Kervala:

Root@vps155841: ~ sudo add-apt-repository ppa:kervala/ppa && sudo apt-get update
Sudo: add-apt-repository: command not found

It's wrong!

I'll start by setting up authentication on the LDAP directory. Then I'll see more precisely how to set up repositories.

Current content of sources.list:

deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe
deb http://security.ubuntu.com/ubuntu trusty-security main restricted universe

LDAP directory

1 - installation of slapd to make a local slave replicate, which will allow to be more autonomous while remaining synchronized. In a first step, we will directly query the remote directory, so we must add a secure connection between the servers, which will in any case be necessary in any case.

apt-get update
apt-get install slapd ldap-utils 

Configuration utilities ldap :

root@vps155841:~# cat /etc/ldap/ldap.conf 
#
# LDAP Defaults
#

# See ldap.conf(5) for details
# This file should be world readable but not world writable.

#BASE	dc=example,dc=com
#URI	ldap://ldap.example.com ldap://ldap-master.example.com:666
BASE    dc=khaganat,dc=net
URI     ldaps://khaganat.net


#SIZELIMIT	12
#TIMELIMIT	15
#DEREF		never

# TLS certificates (needed for GnuTLS)
TLS_CACERT	/etc/ssl/certs/ca-certificates.crt

Configuration of TLS: on the server khaganat.net, modification of /etc/defaults/slapd, and restart.

SLAPD_SERVICES="ldap://127.0.0.1:389/ ldapi:/// ldaps:///"

Test with ldapsearch -D “cn=admin, dc=khaganat, dc=net” -W: error

Test to reuse gandi certificates.

Ldap-tls-config.ldif file:

dn: cn=config
add: olcTLSCACertificateFile
olcTLSCACertificateFile: /etc/ssl/certs/GandiStandardSSLCA2.pem
-
add: olcTLSCertificateFile
olcTLSCertificateFile: /etc/ssl/certs/khaganat.net.crt
-
add: olcTLSCertificateKeyFile
olcTLSCertificateKeyFile: /etc/ssl/private/khaganat.net.key
ldapmodify -QY EXTERNAL -H ldapi:/// -f ldap-tls-config.ldif

The slapd server does not start anymore.

Configuring replication

Compilation Test

apt-get install mercurial
adduser compil
adduser compil sudo
su - compil

dependencies

I install the dependencies after the atlassian tutorial, removing libwww:

compil@vps155841:~$ sudo apt-get install mercurial 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 libmysqlclient15-dev bison libxmu-dev autoconf automake libsquish-dev libcpptest-dev
[sudo] password for compil: 
Reading Package Lists... Done
Building the dependency tree
Reading status information... Done
Note, select 'libmysqlclient-dev' instead of 'libmysqlclient15-dev'
E: Unable to find the package libsquish-dev
compil@vps155841:~$ 

After removing libsquish-dev, it passes, so we must add the depot kervala.

compil@vps155841:~$ cat /etc/apt/sources.list.d/kervala.list
deb http://ppa.launchpad.net/kervala/ppa/ubuntu trusty main
compil@vps155841:~$ gpg  --recv-keys 9C2306555E354EB2
compil@vps155841:~$ gpg --export --armor 5E354EB2 |sudo apt-key add - 
OK
compil@vps155841:~$ sudo apt-get update
...
compil@vps155841:~$ sudo apt-get install mercurial 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 libmysqlclient15-dev bison libxmu-dev autoconf automake libsquish-dev libcpptest-dev

Libsquish-dev is not found, it will be complimented by hand.

compil@vps155841:~$ sudo apt-get install mercurial 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 libmysqlclient15-dev bison libxmu-dev autoconf automake libcpptest-dev
...
After this, an additional 306 MB of disk space will be used.
Would you like to continue ?[We]
...

Recovering sources

compil@vps155841:~$ hg clone http://depots.khaganat.net/scm/hg/khanat-code
destination directory: khanat-code
requesting all changes
adding changesets
adding manifests
adding file changes
added 6264 changesets with 61202 changes to 26592 files (+26 heads)
updating to branch default
13345 files updated, 0 files merged, 0 files removed, 0 files unresolved
compil@vps155841:~$ hg clone http://hg.kervala.net/packaging
destination directory: packaging
requesting all changes
adding changesets
adding manifests
adding file changes
added 593 changesets with 30783 changes to 24125 files
updating to branch default
22211 files updated, 0 files merged, 0 files removed, 0 files unresolved

Compilation

compil@vps155841:~$ export RYHOME=$(pwd)/khanat-code/code
compil@vps155841:~$ mkdir $RYHOME/build && cd $RYHOME/build
compil@vps155841:~/khanat-code/code/build$ 

Cmake ask libwww.(ligne cmake: cmake -DWITH_NEL_TESTS=OFF -DWITH_RYZOM_SERVER=ON -DWITH_QT=OFF -DWITH_RYZOM_CLIENT=OFF -DWITH_RYZOM_TOOLS=ON -DWITH_STATIC=ON -DWITH_DRIVER_OPENGL=OFF -DWITH_DRIVER_OPENAL=OFF ..) Still on test development.

To have the debug symbols for gdb, think about adding: -DWITH_SYMBOLS=ON

I found the line cmake of Liria for my VM: cmake -DWITH_NEL_TESTS=OFF -DWITH_RYZOM_CLIENT=OFF -DWITH_STATIC=ON -DWITH_DRIVER_OPENGL=OFF -DWITH_DRIVER_OPENAL=OFF -DWITH_NEL=ON -DWITH_SOUND=OFF -DWITH_STATIC_DRIVERS=ON -DWITH_NEL_SAMPLES=OFF
Yann K 2015/12/06 16:08

compil@vps155841:~/khanat$ hg checkout develop
77 files updated, 0 files merged, 3 files removed, 0 files unresolved
compil@vps155841:~/khanat$ cd $RYHOME/build
compil@vps155841:~/khanat-code/code/build$ cmake -DWITH_NEL_TESTS=OFF  -DWITH_RYZOM_SERVER=ON -DWITH_QT=OFF -DWITH_RYZOM_CLIENT=OFF -DWITH_RYZOM_TOOLS=ON -DWITH_STATIC=ON -DWITH_DRIVER_OPENGL=OFF -DWITH_DRIVER_OPENAL=OFF ..
-- DEBUG size_t is 8
-- DEBUG off_t is 8
-- Boost version: 1.54.0
-- Luabind is using Lua 5.2
-- Found Lua52: /usr/lib/x86_64-linux-gnu/liblua5.2.so;/usr/lib/x86_64-linux-gnu/libm.so  
-- Found Luabind: /usr/lib/libluabind.so
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.35.0") 
-- Found FreeType: /usr/lib/x86_64-linux-gnu/libfreetype.so
-- Found Ogg: /usr/lib/x86_64-linux-gnu/libogg.so
-- Found Vorbis: /usr/lib/x86_64-linux-gnu/libvorbis.so
-- Warning: Unable to find Squish!
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.0.1f") 
-- Found MySQL: /usr/include/mysql, /usr/lib/x86_64-linux-gnu/libmysqlclient.so;/usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/compil/khanat-code/code/build
compil@vps155841:~/khanat-code/code/build$ make -j5
...
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.
make[2]: *** [nel/src/gui/CMakeFiles/nelgui.dir/lua_ihm.cpp.o] Error 4
make[2]: *** Waiting for unfinished jobs....
Scanning dependencies of target shapes_exporter
compil@vps155841:~/khanat-code/code/build$ make -j5
...

After several crashes with this kind of compilation, I try with the -j3 option, then -j1 The compilation seems to prefer this one but it still makes errors. Final error:

collect2: error: ld returned 1 exit status
make[2]: *** [bin/ryzom_shard_unifier_service] Error 1
make[1]: *** [ryzom/server/src/shard_unifier_service/CMakeFiles/ryzom_shard_unifier_service.dir/all] Error 2
make: *** [all] Error 2

We try again

compil@vps155841:~/khanat-code/code/build$ make clean
compil@vps155841:~/khanat-code/code/build$ make -j1
...
[ 27%] Building CXX object nel/src/gui/CMakeFiles/nelgui.dir/lua_ihm.cpp.o
{standard input}: Assembler messages:
{standard input}:992: Warning: end of file not at end of a line; newline inserted
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.
make[2]: *** [nel/src/gui/CMakeFiles/nelgui.dir/lua_ihm.cpp.o] Error 4
make[1]: *** [nel/src/gui/CMakeFiles/nelgui.dir/all] Error 2
make: *** [all] Error 2
compil@vps155841:~/khanat-code/code/build$ df -h
Filesystem         Size  Used Avail Use% Mounted on
/dev/ploop14585p1   11G  2,6G  7,7G  26% /
none               4,0K     0  4,0K   0% /sys/fs/cgroup
none               103M   72K  103M   1% /run
none               512M     0  512M   0% /dev/shm
none               5,0M     0  5,0M   0% /run/lock
none               512M     0  512M   0% /run/shm
none               100M     0  100M   0% /run/user

Added -DFINAL_VERSION=ON -DCMAKE_INSTALL_PREFIX: PATH=/home/compil/ryzomserver/ to cmake.

The error occurs on nelgui.dir, shortly before we have this line: [26%] Building CXX object nel/src/gui/ CMakeFiles /nelgui.dir/libwww_types.cpp.o that runs correctly.

I resume the default branch and compile libwww.

compil@vps155841:~/khanat-code$ hg checkout default
cd ..
compil@vps155841:~$ hg clone http://hg.kervala.net/libwww
compil@vps155841:~$ cd libwww/
compil@vps155841:~/libwww$ ./autogen.sh
...
compil@vps155841:~/libwww$ ./configure --with-ssl=no --with-zlib --with-expat --with-gnu-ld --enable-shared
...
compil@vps155841:~/libwww$ make
...
compil@vps155841:~/libwww$ sudo make install
...
compil@vps155841:~$ cd $RYHOME/build
compil@vps155841:~/khanat-code/code/build$ 

And as long as there is also cpptest

Shepeng> I complicated squish, not wondering why it works then before no
<Deed> ok
<Shepeng> hg clone http://hg.kervala.net/cmake
<Deed> I will make a post on the forum with everything that I found if you still have errors
<Shepeng> hg clone http://hg.kervala.net/squish
<Shepeng> export CMAKE_MODULE_PATH=$(pwd)/cmake/modules
<Shepeng> cd squish /
<Shepeng> mkdir build
<Shepeng> cd build
<Shepeng> cmake ..
<Shepeng> make
<Shepeng> then pass root etmake install
<Shepeng> and I retent the server compilation

But I have the same error.

Test with the kua 5.1 OFF option: compil@vps155841:~/khaganat/code/build$ cmake -DWITH_NEL=ON -DWITH_RYZOM_SERVER=ON -DWITH_STATIC=ON -DWITH_STATIC_DRIVERS=ON -DWITH_RYZOM_CLIENT=OFF -DWITH_DRIVER_OPENGL=OFF -DWITH_DRIVER_OPENAL=OFF -DWITH_SOUND=OFF -DWITH_NEL_TOOLS=OFF -DWITH_RYZOM_TOOLS=OFF -DWITH_NEL_TESTS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_LUA51=OFF ..

it goes!

Ma VM a été compilée avec les options :
cmake -DWITH_NEL_TESTS=OFF -DWITH_RYZOM_CLIENT=OFF -DWITH_NEL=ON -DWITH_SOUND=OFF -DWITH_STATIC=ON -DWITH_STATIC_DRIVERS=ON -DWITH_DRIVER_OPENGL=OFF -DWITH_DRIVER_OPENAL=OFF -DWITH_NEL_SAMPLES=OFF

Configuration

I continue on this tutorial: https://ryzomcore.atlassian.net/wiki/display/RC/Configure+Linux+Web+Services

 apt-get install apache2 php5 php5-mysql php5-gd rrdtool screen
 adduser compil www-data

Configuration apache :

<VirtualHost *:80>
        ServerName http://khanat.khaganat.net

        ServerAdmin webmaster@localhost
        DocumentRoot /home/compil/ryzomweb

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

</VirtualHost>
<VirtualHost *:40916>
        ServerName http://khanat.khaganat.net

        ServerAdmin webmaster@localhost
        DocumentRoot /home/compil/ryzomweb

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

</VirtualHost>
compil@vps155841:~$ cp -r khanat-code/code/web/public_php/ ryzomweb/
compil@vps155841:~$ cp -r khanat-code/code/web/private_php/ ryzomweb/
compil@vps155841:~$ chgrp www-data -R ryzomweb/

I have an access error:

[Tue Aug 25 08:22:20.602092 2015] [authz_core:error] [pid 19350] [client 80.236.34.112:39932] AH01630: client denied by server configuration: /home/compil/ryzomweb/public_php/setup/index.php

Editing the file: /etc/apache2/apache2.conf :

...
<Directory /home/compil/ryzomweb>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>
...
Installation via the web

From the url: http://khanat.khaganat.net/setup/install.php

Apt-get install mysql-server

Creating mdp for root mysql and admin tool, setup and ams

manque mcrypt : apt-get install php5-mcrypt php5enmod mcrypt service apache2 restart

Shardn Launch Pb tries to resolve
hg clone http://depots.khaganat.net/scm/hg/khanat-ressources
ln -s /home/compil/khanat-ressources/leveldesign/ /home/compil/khaganat/code/ryzom/server/leveldesign
ln -s /home/compil/khanat-ressources/primitives/ khaganat/code/ryzom/server/primitives
ln -s /home/compil/khanat-ressources/sound khaganat/code/ryzom/server/sound
ln -s /home/compil/khanat-ressources/common khaganat/code/ryzom/server/common
ln -s /home/compil/khanat-ressources/continents/ khaganat/code/ryzom/server/continents
ln -s /home/compil/khanat-ressources/translation/ khaganat/code/ryzom/server/translation
ln -s /home/compil/khanat-ressources/workspace/ khaganat/code/ryzom/server/workspace
mkdir khanat-code/code/ryzom/server/data_leveldesign
ln -s /home/compil/khanat-ressources/leveldesign/ /home/compil/khanat-code/code/ryzom/server/data_leveldesign/leveldesign
ln -s /home/compil/khanat-ressources/collisions/ khanat-code/code/ryzom/server/data_shard/collisions

Modified I modified this file: $RYZOM_PATH/server/frontend_service.cfg replaced the address by khanat.khaganat.net in variable FSListenHost = “your.server.ip.adress”;

I cheat :

for var in khanat-code/code/ryzom/server/translation/translated/*_en.txt; do  nomfic=${var##*/}; ln -s $nomfic ${var%/*}/${nomfic/_en/_de}; done
for var in khanat-code/code/ryzom/server/translation/translated/*_wk.txt; do  nomfic=${var##*/}; ln -s $nomfic ${var%/*}/${nomfic/_wk/_fr}; done
for var in khanat-code/code/ryzom/server/translation/translated/*_en.txt; do  nomfic=${var##*/}; ln -s $nomfic ${var%/*}/${nomfic/_en/_es}; done
for var in khanat-code/code/ryzom/server/translation/translated/*_en.txt; do  nomfic=${var##*/}; ln -s $nomfic ${var%/*}/${nomfic/_en/_ru}; done

Recompile data from datasheets

It is possible that there is a problem with the sheet_id.bin/visual_slot.tab and other packed_sheets at the start in which case you have to recreate them(but you must have compiled the tools for that):

A priority on our server, the commands to be made will be:

cd /home/compil/khaganat-code/code/build/bin
./make_sheet_id -o/home/compil/khanat-ressources/leveldesign/game_elem/sheet_id.bin /home/compil/khanat-ressources/leveldesign/game_elem /home/compil/khanat-ressources/leveldesign/game_element /home/compil/khanat-ressources/leveldesign/world /home/compil/khanat-ressources/leveldesign/ecosystems

The idea is to indicate all the datasheets useful to the system so that it numbers them by giving it the list of all the directories in leveldesign where there are (except that of definition) and the -o is for Indicate to create this file in the directory game_elem of the folder leveldesign

We must also delete files that we will regenerate:

rm -f /home/compil/khanat-code/code/ryzom/server/data_shard/*.packed_sheets
rm -f /home/compil/khanat-code/code/ryzom/common/data_common/visual_slot.tab

You must then restart the sheet_packer, first configuring its config file:

cd /home/compil/khanat-code/code/ryzom/tools/sheets_packer
nano sheets_packer.cfg

And make sure the paths are good, with the filename changes etc. For us I got to:

/////////////////////////////////
/////////////////////////////////
/// 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 directory where we have this .cfg file because the paths are relative:

/home/compil/khanat-code/code/build/bin/sheets_packer

Then copy the visual_slot.tab to its place

cp visual_slot.tab /home/compil/khanat-code/code/ryzom/common/data_common/visual_slot.tab

If I recall correctly, *.packed_sheets are regenerated by themselves when the server restarts if they are absent(which is the case since they have just been deleted). It is therefore necessary to wait until it is launched to be able to retrieve them and copy them in its client(see below).

Attention: it will be necessary to provide this to the client(in it's “user” directory):

  • *.packed_sheets files from /home/compil/khanat-code/code/ryzom/server/data_shard/
  • The visual_slot.tab file in /home/compil/khanat-code/code/ryzom/common/data_common/
  • The file sheet_id.bin in /home/compil/khanat-code/code/ryzom/common/data_leveldesign/leveldesign/Game_elem/
khanat-code/code/ryzom/common
khanat-code/code/ryzom/tools/scrips/linux
khanat-code/code/ryzom/server
khanat-code/code/build/bin/ryzom_*_service

khanat-ressources/leveldesign/   khanat-code/code/ryzom/common/data-leveldesign/leveldesign
khanat-ressources/primitives/    khanat-code/code/ryzom/common/data-leveldesign/primitives
khanat-ressources/sound          khanat-code/code/ryzom/server/sound
khanat-ressources/common         khanat-code/code/ryzom/server/common
khanat-ressources/continents/    khanat-code/code/ryzom/server/continents
khanat-ressources/translation/   khanat-code/code/ryzom/server/translation
khanat-ressources/workspace/     khanat-code/code/ryzom/server/workspace
khanat-ressources/collisions/    khanat-code/code/ryzom/server/data_shard/collisions

To reduce the errors in AIS launch logs that seemingly bother, I deleted all symbolic links to the khaganat-data content that was directly in /khaganat-code/code/ryzom/server as well as the Directories /src and /patchman_cfg that were there and /dataleveldesign which contained another cross-reference to khaganat-ressources/leveldesign.

I retained the contents of the two deleted directories in /home/compil/storage_temp. Just relocate its contents to /home/compil/khaganat-code/code/ryzom/server if needed
YannK 2015/11/08 15: 42

To check, that the shard works without a customer:

http://khanat.khaganat.net:40916/login/r2_login.php?cmd=login&login=******&password=******&clientApplication=ryzom_open
CC Attribution-Share Alike 4.0 International Driven by DokuWiki
en/trace_d_installation_du_serveur_de_jeu.txt · Last modified: 2021/12/03 19:19 by 127.0.0.1

Licences Mentions légales Accueil du site Contact