Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Configuring and running Ryzom Core server on GNU/Linux

...

Tip

If your frontend service is available through a firewall using NAT and a mapped IP address this is how you can advertise that external IP address. For example if your FS is on 192.168.1.100 internally but your firewall maps 74.125.225.210 through to your FS you would want to configure FSListenHost to be the address the clients connect to: 74.125.225.210.

 

 

Configuring Apache and web tools

...

Warning

Don't forget to change the paths used below to match where your source is checked out!

borderStyle
Panel
dashedtitleMain Login Site
borderStyledashed
Listen 40916
<VirtualHost *:40916>
  <Directory "/home/username/ryzom/code/ryzom/tools/server/">
     Options -Indexes FollowSymLinks MultiViews
     IndexOptions FancyIndexing FoldersFirst NameWidth=*
     AllowOverride All
     Order allow,deny
     Allow from all
  </Directory> 
  ServerAdmin admin@localhost
  DocumentRoot /home/username/ryzom/code/ryzom/tools/server/www
  ServerName localhost
</VirtualHost>
dashed
Panel
borderStyle
titleMain Web Site
borderStyledashed
<VirtualHost *:80>
 
  ServerName localhost
  <DirectoryDocumentRoot "/home/username/ryzom/code/ryzom/tools/server/">
    /ryzom_ams/www/html/"
 
  Alias /admin/ /home/username/ryzom/code/ryzom/tools/server/admin/
  <Directory "/home/username/ryzom/code/ryzom/tools/server/admin/">
    Options -Indexes FollowSymLinks MultiViews
    
    IndexOptions FancyIndexing FoldersFirst NameWidth=*
         AllowOverride All
         Order allow,deny
     
    Allow from all
      </Directory> 
  ServerAdmin admin@localhost
DirectoryIndex index.php
 
    AddType # You can change this if you want.
  DocumentRoot /home/username/ryzom/code/ryzom/tools/server/admin
 
  # Admin Tool
  Alias /admin/ /home/username/ryzom/code/ryzom/tools/server/admin
 
  ServerName localhost text/html .php .phps
    AddHandler application/x-httpd-php .php
    AddHandler application/x-httpd-php-source .phps
  </Directory>
</VirtualHost>
Tip

You can place these into the same configuration file or separately, it's up to you. If you want to serve up some unique content, a signup page or something along those lines you can change the main website's DocumentRoot so long as the admin tool alias is still there.

...

cd code/ryzom/tools/server/admin/templates/
cp -r default default_c
chmod a+w default_c

 

Setting up MySQL

Note

The configuration files in code/ryzom/server expect your user to be named 'shard' with NO PASSWORD. If you decide to use a different name for your MySQL user, or assign it a password, you will need to go through the .cfg files and change these values from 'shard' and "" wherever they appear. (they appear in several of the .cfg files)

Since this (and a password) can lead to unexpected errors (eg. error '4000') it is best to make sure everything works correctly with the defaults first.

...

Tip
titleRunning and Monitor the Shard
  • To start: shard start
  • To stop: shard stop
  • To view screen: shard join
  • To switch monitored service: Ctrl-A+n


 To make the shard start on boot use the below init script

Info
titleService Script

#!/bin/sh

# chkconfig: 235 99 10

# description: Start or stop the Ryzom Core server

#

### BEGIN INIT INFO

# Provides: Ryzom Core Shard

# Required-Start: $network $syslog

# Required-Stop: $network

# Default-Start: 2 3 5

# Default-Stop: 0 1 6

# Description: Start or stop the Ryzom Core server

### END INIT INFO

 

export RYZOM_PATH=/home/taadmin/ryzom/code/ryzom

export PATH=$PATH:$RYZOM_PATH/tools/scripts/linux

 

start="$RYZOM_PATH/tools/scripts/linux/shard start"

stop="$RYZOM_PATH/tools/scripts/linux/shard stop"

lockfile=/var/lock/ryzomcoreshard

name='Ryzom Core Shard'

 

case "$1" in

'start')

        $start >/dev/null 2>&1 </dev/null

        RETVAL=$?

        if [ "$RETVAL" = "0" ]; then

                touch $lockfile >/dev/null 2>&1

        fi

        ;;

'stop')

        $stop

        RETVAL=$?

        if [ "$RETVAL" = "0" ]; then

                rm -f $lockfile

        fi

        ;;

'status')

        if [ -f $lockfile ]; then

                echo "$name is running"

                RETVAL=0

        else

                echo "$name is stopped"

                RETVAL=1

        fi

        ;;

'restart')

        $stop ; $start

        RETVAL=$?

        ;;

*)

        echo "Usage: $0 { start | stop | restart }"

        RETVAL=1

        ;;

esac

exit $RETVAL

 

 

...

 

Notes

If you want to use your shard with the core client, you will have to copy the following file into code/ryzom/common/data_common:

...