« Previous - Version 40/70 (diff) - Next » - Current version
ashly, 07/08/2010 08:25 am


Configuring and running Ryzom Core server on Linux

Making changes in services config files

  • Change FSListenHost in code/ryzom/server/frontend_service.cfg to your address (e.g. 192.168.0.1). If you set up server on different machine, remember it has to be address that's reachable on client host.

Setting up MySQL

  • Remove STRICT_TRANS_TABLES from sql_mode in your MySQL configuration. You can check if you have it by doing
SHOW VARIABLES WHERE Variable_name='sql_mode';
  • Or can run an SQL query within your database management tool, such as phpMyAdmin:
SET @@global.sql_mode= '';
  • Prepare MySQL databases
* Login to the MySQL database server using the command line:

mysql -uroot -p

* Create your databases ( nel, nel_tool, and ring_open ):

CREATE DATABASE nel;
CREATE DATABASE nel_tool;
CREATE DATABASE ring_open;

* Create the new user and grant privileges for that user on your new databases:

GRANT ALL ON nel.* TO shard@localhost;
GRANT ALL ON nel_tool.* TO shard@localhost;
GRANT ALL ON ring_open.* TO shard@localhost;

* Flush privileges, to commit the changes

FLUSH PRIVILEGES;
  • If you use different usernames and password for database, you need to change files: code/ryzom/server/sql.cfg, code/ryzom/tools/server/www/login/config.php, code/ryzom/tools/server/admin/config.php
  • Change all occurences of open.ryzom.com in code/ryzom/tools/server/sql/ryzom_default_data.sql to your address (e.g. 192.168.0.1), but remember to keep ports (:4999 etc) as is.
  • Popoulate databases with default data
cat code/ryzom/tools/server/sql/ryzom_tables.sql | mysql -ushard
cat code/ryzom/tools/server/sql/ryzom_default_data.sql | mysql -ushard
cat code/ryzom/tools/server/sql/ryzom_admin_default_data.sql | mysql -ushard nel_tool
  • In MySQL update host for admin app. Change YOUR_ADDRESS to your address (e.g. 192.168.0.1).
USE nel_tool
UPDATE neltool_domains SET domain_as_host='YOUR_ADDRESS' where domain_id=12;
  • If you plan to make your shard public, consider this:
< Kaetemi> and only the SU, FS and web services should have a public ip, the other should be behind private for security reasons :)

Configuring Apache and web tools

  • Ubuntu user: Don't forget to install php5-mysql synaptic packet and to uncomment "extension=mysql.so" into "php.ini" file to allow mysql connection from php code.
  • Configure Apache with PHP. Make a VirtualHost (usually in /etc/apache2/httpd.conf) for the login scripts and admin app (replace DocumentRoot with your own path).
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>
<VirtualHost *:80>
  <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/admin
  ServerName localhost
</VirtualHost>
  • Restart Apache by typing the following.
/etc/init.d/apache2 restart
Note: If you are using ubuntu 10.4 you will need to type.
sudo /etc/init.d/apache2 restart
  • Set NELTOOL_SITEBASE to your server address and NELTOOL_SYSTEMBASE to your path in code/ryzom/tools/server/admin/config.php.
  • Create code/ryzom/server/save_shard/rrd_graphs/ directory.
mkdir -p code/ryzom/server/save_shard/rrd_graphs/
  • Change $LogRelativePath to 'logs/' in code/ryzom/tools/server/www/login/config.php (NOTE: log directory has to be writeable by webserver and it's not wise to give it write access to the directory where script is.)
$LogRelativePath = 'logs/';
  • Make code/ryzom/tools/server/www/login/logs/ directory and make it writeable by all for login script logs.
mkdir -p code/ryzom/tools/server/www/login/logs/
chmod o+w code/ryzom/tools/server/www/login/logs/
cd code/ryzom/tools/server/admin/templates/
cp -r default default_c
chmod o+w default_c
<pre>

h2. Running the shard

* Remember to have path to the scripts in your PATH. You'll need *screen* app for this script.

* Ubuntu users, the 'shard/screen' scripts included will not work properly with the default 'dash' shell included in order to fix this run "sudo dpkg-reconfigure dash" and select "no".  Alternatively you could modify both @code/ryzom/tools/scripts/linux/shard@ and @code/ryzom/server/shard.screen.rc@ and find/replace any /bin/sh to /bin/bash.

* Make sure $RYZOM_PATH is set correctly (according to http://dev.ryzom.com/wiki/ryzom/BuildForLinux)

* Run commands:

<pre>
export PATH=$PATH:$RYZOM_PATH/tools/scripts/linux
shard start
</pre>

h2. Client login errors

* If your client gives you error messages on connect, check http://dev.ryzom.com/wiki/ryzom/ClientConnectErrors