Everything Server Ubuntu

This article aims at building and running a Ryzom OpenShard server on ubuntu.

Install Ubuntu server

Ubuntu Server 32bit 10.10 Maverick: 
http://mirror.ovh.net/ubuntu-releases/10.10/ubuntu-10.10-server-i386.iso
If help needed, see: https://help.ubuntu.com/10.10/serverguide/C/installation.html
It can be setup in a virtual machine, like VirtualBox: https://help.ubuntu.com/community/VirtualBox
  • user: ryzom
  • packages choice: ssh

Get Packages & Sources

Update repository information and packages:

sudo apt-get update; sudo apt-get upgrade

At this point, if the kernel was update, you should consider rebooting:

sudo reboot

Install needed tools and libs to compile and run the server.(The MySQL root password will be prompt and will be needed later to log in phpmyadmin):

sudo apt-get install nano cmake bison build-essential boost-build mercurial screen apache2 mysql-server phpmyadmin rrdtool \
libgl1-mesa-dev libopenal-dev libogg-dev libvorbis-dev libluabind-dev libfreetype6-dev \
libpng12-dev libjpeg62-dev libx11-dev libxxf86vm-dev libxrandr-dev libxrender-dev \
libcurl4-openssl-dev libxmu-dev libexpat1-dev libxml2-dev libmysqlclient-dev zlib1g-dev

Download and install libwww:

mkdir /home/source && cd /home/source
wget http://mirror.ovh.net/ubuntu//pool/universe/w/w3c-libwww/libwww-ssl0_5.4.0-11build2_i386.deb
wget http://mirror.ovh.net/ubuntu//pool/universe/w/w3c-libwww/libwww-dev_5.4.0-11build2_i386.deb
sudo dpkg -i libwww-dev_5.4.0-11build2_i386.deb libwww-ssl0_5.4.0-11build2_i386.deb

Download and build luabind:

wget http://ovh.dl.sourceforge.net/project/luabind/luabind/0.9/luabind-0.9.tar.gz
tar xvfz luabind-0.9.tar.gz
cd luabind-0.9
sudo bjam --prefix=/usr/local install

Download ryzom source code:

mkdir /home/ryzom && cd /home
hg clone http://ryzom.hg.sourceforge.net:8000/hgroot/ryzom/ryzom

Build Ryzom OpenShard server

Set environment variable to bash:

echo "export RYHOME=/home/ryzom/code" >> /home/.bashrc
echo "export RYZOM_PATH=/home/ryzom/code/ryzom" >> /home/.bashrc
echo "export PATH=\$PATH:\$RYZOM_PATH/tools/scripts/linux" >> /home/.bashrc
. /home/.bashrc

Configuration option are set to build only nel & server (in static: http://dev.ryzom.com/projects/ryzom/wiki/BuildForLinuxCmake#Server-Chain-Crashingsee also CMakeOptions):

mkdir $RYHOME/build && cd $RYHOME/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 ..

Build and install:

make -j3
sudo make install

Copy the compiled binaries to their proper locations:

cp $RYHOME/build/bin/ryzom_admin_service $RYZOM_PATH/server/src/ryzom_admin_service/ryzom_admin_service
cp $RYHOME/build/bin/ryzom_ai_service $RYZOM_PATH/server/src/ai_service/ai_service
cp $RYHOME/build/bin/ryzom_backup_service $RYZOM_PATH/server/src/backup_service/backup_service
cp $RYHOME/build/bin/ryzom_dynamic_scenario_service $RYZOM_PATH/server/src/dynamic_scenario_service/dynamic_scenario_service
cp $RYHOME/build/bin/ryzom_entities_game_service $RYZOM_PATH/server/src/entities_game_service/entities_game_service
cp $RYHOME/build/bin/ryzom_frontend_service $RYZOM_PATH/server/src/frontend_service/frontend_service
cp $RYHOME/build/bin/ryzom_gpm_service $RYZOM_PATH/server/src/gpm_service/gpm_service
cp $RYHOME/build/bin/ryzom_ios_service $RYZOM_PATH/server/src/input_output_service/input_output_service
cp $RYHOME/build/bin/ryzom_log_analyser_service $RYZOM_PATH/server/src/log_analyser_service/log_analyser_service
cp $RYHOME/build/bin/ryzom_logger_service $RYZOM_PATH/server/src/logger_service/logger_service
cp $RYHOME/build/bin/ryzom_mail_forum_service $RYZOM_PATH/server/src/mail_forum_service/mail_forum_service
cp $RYHOME/build/bin/ryzom_mirror_service $RYZOM_PATH/server/src/mirror_service/mirror_service
cp $RYHOME/build/bin/ryzom_naming_service $RYZOM_PATH/server/src/ryzom_naming_service/ryzom_naming_service
cp $RYHOME/build/bin/ryzom_pd_support_service $RYZOM_PATH/server/src/pd_support_service/pd_support_service
cp $RYHOME/build/bin/ryzom_persistant_data_service $RYZOM_PATH/server/src/persistant_data_service/persistant_data_service
cp $RYHOME/build/bin/ryzom_reference_builder_service $RYZOM_PATH/server/src/pd_reference_builder/pd_reference_builder
cp $RYHOME/build/bin/ryzom_session_browser_service $RYZOM_PATH/server/src/session_browser_server/session_browser_server
cp $RYHOME/build/bin/ryzom_shard_unifier_service $RYZOM_PATH/server/src/shard_unifier_service/shard_unifier_service
cp $RYHOME/build/bin/ryzom_tick_service $RYZOM_PATH/server/src/tick_service/tick_service
cp $RYHOME/build/bin/ryzom_welcome_service $RYZOM_PATH/server/src/ryzom_welcome_service/ryzom_welcome_service

Configure Ryzom OpenShard server

Fix shell problems:

sed -i 's:/bin/sh:/bin/bash:g' $RYZOM_PATH/tools/scripts/linux/shard
sed -i 's:/bin/sh:/bin/bash:g' $RYZOM_PATH/server/shard.screen.rc

Edit different files to match our server configuration :

FSListenHost = "your.server.ip.adress";

nano $RYZOM_PATH/server/frontend_service.cfg

define('NELTOOL_SYSTEMBASE','/home/ryzom/code/ryzom/tools/server/admin/');

nano $RYZOM_PATH/tools/server/admin/config.php

$LogRelativePath = './logs';

nano $RYZOM_PATH/tools/server/www/login/config.php

Create missing directory and set permissions:

mkdir $RYZOM_PATH/server/save_shard/rrd_graphs/
mkdir $RYZOM_PATH/tools/server/www/login/logs/
chmod o+w $RYZOM_PATH/tools/server/www/login/logs/
chmod o+w $RYZOM_PATH/tools/server/admin/graphs_output
cp -r $RYZOM_PATH/tools/server/admin/templates/default $RYZOM_PATH/tools/server/admin/templates/default_c
chmod o+w $RYZOM_PATH/tools/server/admin/templates/default_c

Configure Apache2 Web Server & MySQL Database

Replace the content with: http://dev.ryzom.com/attachments/1150/default

sudo nano /etc/apache2/sites-available/default

Restart apache2 service:

sudo service apache2 restart

Then, go to: http://your.server.ip.adress/phpmyadmin and import http://dev.ryzom.com/attachments/1151/ryzom.sql to setup the database.

Run the Shard

shard start
  • The Shard is running in screen, so you can monitor each of the running service by: CTRL+A, N
  • Alternatively, you can use the web-Admin interface: http://your.server.ip.adress (default login: guest/guest or admin/guest)
To stop the Shard:
  • detached screen by pressing CTRL+A, D
shard stop

Ressources

default - /etc/apache2/sites-available/default | Web server config (1.1 kB) JulFX, 12/20/2010 01:05 pm

ryzom.sql - ryzom.sql | Database to import in phpmyadmin (46.6 kB) JulFX, 12/20/2010 01:05 pm