Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 42 Next »

Configuring and running Ryzom Core Web Services on GNU/Linux

Preparing Packages

For Debian/Ubuntu users you will need to install the following packages:

sudo apt-get install apache2 php5 php5-mysql php5-gd rrdtool screen

VHost

Create a public web directory and point a VHost to it.

Point a second VHost to the same directory with port 40916

Upload

Upload the following to your public web directory of your PHP host

/code/web/public_php

Upload the following to a private directory accessible by your PHP host

/code/web/private_php

Setup (TODO)

Run the following script and follow the instructions

http://<hostname>/setup/

This script will create a config.php under the public php directory, and set up the nel, nel_tool and ams databases.

 

 

 

What follows is the complicated outdated guide

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).

For current Ubuntu versions you can just edit the file default in /etc/apache2/sites-available/ - substituting what is listed below for what is already there. It may be helpful to break this into multiple site configuration files but isn't necesasry.

Don't forget to change the paths used below to match where your source is checked out! They are highlighted in red.

Apache 2.4

Main Login Site

Listen 40916

<VirtualHost *:40916>

  <Directory "/home/username/ryzom/code/ryzom/tools/server/">

     Options -Indexes FollowSymLinks MultiViews

     IndexOptions FancyIndexing FoldersFirst NameWidth=*

     AllowOverride All

     Require all granted

  </Directory>

  ServerAdmin admin@localhost

  DocumentRoot /home/username/ryzom/code/ryzom/tools/server/www

  ServerName localhost

</VirtualHost>

Main Web Site

<VirtualHost *:80>

  ServerName localhost

 

  DocumentRoot "/home/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/"

  <Directory /home/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/>

    Options -Indexes +FollowSymLinks +MultiViews

    AllowOverride All

    Require all granted

    DirectoryIndex index.php

    AddType text/html .php .phps

    AddHandler application/x-httpd-php .php

    AddHandler application/x-httpd-php-source .phps

  </Directory>  

 

  Alias /admin/ /home/username/ryzom/code/ryzom/tools/server/admin/

  <Directory "/home/ryzom/ryzomcore/code/ryzom/tools/server/admin/">

    Options -Indexes +FollowSymLinks +MultiViews

    AllowOverride All

    Require all granted

    DirectoryIndex index.php

    AddType text/html .php .phps

    AddHandler application/x-httpd-php .php

    AddHandler application/x-httpd-php-source .phps

  </Directory>

</VirtualHost>

Apache 2.2

Main Login Site

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>

Main Web Site

<VirtualHost *:80>

  ServerName localhost

  DocumentRoot "/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

    DirectoryIndex index.php

 

    AddType text/html .php .phps

    AddHandler application/x-httpd-php .php

    AddHandler application/x-httpd-php-source .phps

  </Directory>

</VirtualHost>

Advanced Configuration Topics

In order to execute system commands like restarting services you will need to be able to log in as root or execute the command using sudo, e.g.:

sudo /etc/init.d/apache2 restart
  • Restart Apache by typing the following.
/etc/init.d/apache2 restart

 

chmod a+w code/ryzom/tools/server/admin/graphs_output
chmod a+w code/ryzom/tools/server/admin/templates/default_c
chmod a+w code/ryzom/tools/server/www/login/logs
chmod a+w code/ryzom/tools/server/ryzom_ams/www/
chmod a+w code/ryzom/tools/server/ryzom_ams/www/html/cache
chmod a+w code/ryzom/tools/server/ryzom_ams/www/html/templates_c

 

Setting up MySQL

 

Running 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.

Create Database and Grant Privileges
GRANT ALL ON nel.* TO newuser@localhost; GRANT ALL ON nel_tool.* TO newuser@localhost; GRANT ALL ON ring_open.* TO newuser@localhost; FLUSH PRIVILEGES;

 

 

  • No labels