Step 1: Get Kakama

Start by grabbing the source for Kakama. To do this, you need a copy of Git installed.

Find more information about install Git at the github guide.

Once installed, clone the Kakama repository by running the following command in a console.

$ git clone git://github.com/katipo/kakama.git

Step 2: Setup Databases

Kakama should work with different databases types, but only MySQL is officially supported.

So lets setup a few tables and permissions for Kakama. Change the database name, username and password as desired.

mysql> create database kakama;
mysql> grant all on kakama.* to 'kakama'@'localhost' identified by 'kakama';

Step 3: Pre-startup Configuration

Now that we have the databases setup, lets tell Kakama how to get to them.

cp config/database.yml.example config/database.yml

Then edit config/database.yml and adjust the database name, username, and password to match what you did in step 2. Also note the mysql.sock location. This various greatly depending on the system you’re on.

Step 4: Initial Data

Now lets install the gems, add the database tables, import some initial data, and get the background server running.

Note: If you plan to run this application in production, add “RAILS_ENV=production” to the beginning of each of the following commands.

$ rake gems:install
$ rake db:setup
$ rake db:seed_fu
$ whenever --update-crontab
$ ruby script/delayed_job start

Step 5: Start Kakama

Finally, lets start the application.

Note: If you plan to run this application in production, it is recommended that you use an application server like Apache in combination with Phusion Passenger to server requests. If you just want to test, add “-e production” to the end of the following command.

$ ruby script/server

Extras: Set up delayed job start on boot for Debian/Ubuntu servers in production

Kakama relies on delayed_job to be running. In case of a restart, you'll want it to start automatically. For Debian/Ubuntu servers, see this document for instructions on how to do this.