Skip to content
Tomen edited this page Feb 15, 2012 · 16 revisions

This instructions will guide you thru installing Elenears Erben on your server. This instructions have been written for Ubuntu 11.4. Please adapt them to your system.

If you have any trouble installing, you can contact us via the forums. Lithium is based on the open source framework Lithium. If you run into problems during installation, give their manual and API reference a try.

Requirements:

  • Windows or Unix-compatible system with shell access. Ubuntu 11.4 was choosen for this guide.
  • PHP 5.3 will be required to run the framework and game itself.
  • Git to check out EE and Lithium.
  • DBMS: Several are available in Lithium: MongoDB, CouchDB, MySQL, SQLite. MongoDB was choosen for this guide.
  • A webserver. Installations instructions are provided for Apache, Cherokee, ISS, Lighttpd, Nginx. Apache was choosen for this guide. If you choose an alternative installation path, check the instructions.

Install the pre-requisites

First, we need to install all the required programs to run Lithium and EE.

sudo apt-get install apache2 php5 libapache2-mod-php5 php5-cli mongodb php-pear git

Check out the project

Now, we will check out the project and the framework.

Part of the team?

git clone [email protected]:BitAlchemists/Elenears-Erben

Read-Only

git://github.com/BitAlchemists/Elenears-Erben.git

Then...

cd Elenears-Erben
git submodule init
git submodule update

EE should work with the latest stable branch. In case of a problem, you can try to revert to a specific tag or commit. eg:

cd libraries/lithium
git checkout lithium-0.10

Configure Apache2

Now, we need to make the game available on the webserver. We add a symbolic link, edit the config and make sure, mod-rewrite is enabled.

sudo ln -s /path/to/Elenears-Erben/app/webroot/ /var/www/alpha

open /etc/apache2/sites-enabled/000-default and create or edit the corresponding Directory-Tag:

Options FollowSymLinks
AllowOverride All

enable mod-rewrite

sudo ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load

Install MongoDB

We previously apt-got mongodb and php-pear. Now, we install mongo via pecl to enable it via PHP.

sudo pecl install mongo

we add the mongo extension to /etc/php5/apache2/php.ini AND /etc/php5/cli/php.ini

extension=mongo.so

Configure CouchDB

Change the connection in config/bootstrap/connections.php to CouchDB. Create the appropriate database.

Test it out

Now, we can restart the web server and check if everything worked out

sudo apache2ctl restart

And then open http://localhost/alpha or whereever you put it. If you have any question, contact us via the forums.

Create a user

Create a user. To aquire admin rights, you need to manually modify the user in the database by adding isAdmin and setting its value to 1. If you have exactly one user in the db, this will suffice:

use game
var admin = db.users.findOne();
admin.isAdmin = 1;
db.users.save(admin);

Create a cron job

Once everything is set up, create a cron job to make EE's heart beating. Do something like this

crontab -e

Add the line * * * * * /usr/local/Elenears-Erben/tick