...
...
...
...
...
...
...
...
...
...
...
...
Configuring and running Ryzom Core server on GNU/Linux
Table of Contents |
---|
Preparing Packages
...
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
...
/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/
- Make sure the
code/ryzom/tools/server/admin/graphs_output
directory thedirectory's requiring write permissions is writeable by all.
chmod a+w code/ryzom/tools/server/admin/graphs_output
...
chmod a+w code/ryzom/tools/server/
...
admin/
...
$LogRelativePath = 'logs/';
...
templates/default_c
chmod a+w code/ryzom/tools/server/www/login
...
/
...
logs
...
mkdir -pchmod a+w code/ryzom/tools/server/ryzom_ams/www/login/logs/ html/cache
chmod a+w code/ryzom/tools/server/www/login/logs/ cd code/ryzom_ams/toolswww/server/admin/templates/ cp -r default default_c chmod a+w defaulthtml/templates_c
Setting up MySQL
Note |
---|
The configuration files in
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. |
Warning | |||||
---|---|---|---|---|---|
| |||||
If you are getting strange errors some config files may have Windows editor "control-M" endline characters, which appears as a blue ^M in vim. You can remove it with this vi command, noting that ^M is typed by pressing Ctrl+V followed by Ctrl+M:
|
You may also skip this section and use the next section entitled "Setting up MySQL (Alternative)". It condenses all the steps listed below into a pre-generated MySQL file that you import.
- 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
Code Block | ||||
---|---|---|---|---|
| ||||
CREATE DATABASE nel;
CREATE DATABASE nel_tool;
CREATE DATABASE ring_open;
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; |
Note |
---|
If you use different usernames and password for database, you need to change the following files:
|
- Change all occurrences 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.
- Change code/ryzom/tools/server/sql/ryzom_admin_default_data.sql replacing /home/nevrax/code/ryzom/server/save_shard/rrd_graphs by your directory.
- 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;
Tip |
---|
If you plan to make your shard public only the SU, FS and web services should have a public IP. The other services should all be behind a firewall for security reasons. |
Setting up MySQL (Alternative)
- Use the Quick Start SQL Setup Script
- Edit the file and replace the following path with your own:
- /home/ryzom/code/ryzom/server/save_shard/rrd_graphs
- Import in phpMyAdmin or sourcing via the mysql CLI.
* Login to the MySQL database server using the command line:
mysql -uroot -p
...
Setting up MySQL Auto Install
Ryzom AMS now includes auto install scripts for the mysql database, all you have to do is load your DocumentRoot on port 80 that was setup above, for example http://127.0.0.1
A page will load that looks like the below, type in your mysql root user/pass.
The installer will by default setup permissions for the user "shard" if you want to use a different user you will need to run the below sql statements.
Code Block | ||||
---|---|---|---|---|
| ||||
GRANT ALL ON nel.* TO shard@localhostnewuser@localhost; GRANT ALL ON nel_tool.* TO shard@localhostnewuser@localhost; GRANT ALL ON ring_open.* TO shard@localhostnewuser@localhost; FLUSH PRIVILEGES; |
...
Running the shard
Info |
---|
If you're running on Ubuntu or Debian, the default shell is actually dash and the shard/screen scripts will not run correctly in dash. The steps following will have you switch to bash. If you want to keep using dash as the default shell then you will need change the shebang from /bin/sh to /bin/bash in the following files:
|
...
Tip | ||
---|---|---|
| ||
|
To make the shard start on boot use the below init script
Info | ||
---|---|---|
| ||
#!/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
|
...
- If your client gives you error messages on connect, check Client Connect Errors.
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:
...