Skip to content
back2arie edited this page May 11, 2011 · 12 revisions

We assume this installation using MySQL database.

Get the source code

Download and extract the latest source code to your web root folder.

Create database and privileges

You can do it via MySQL console or with MySQL GUI like phpMyAdmin.

If you're using MySQL console, follow the following step.

First, connect to your mysql server:
$ mysql -u root -p

Create kalkun database:
CREATE DATABASE kalkun;

It's always good idea to create new user and privileges for kalkun database, so other user like root will not get interrupted, it's optional but you're recommended to do this.
GRANT ALL PRIVILEGES ON kalkun.* TO 'username'@'%' IDENTIFIED BY 'password';

IMPORTANT: You should change username and password depends on your desire

Last, flush users privileges to activate your changes:
FLUSH PRIVILEGES;

Config database

Edit database.php located in system/application/config/, you should see this line:

$db['default']['hostname'] = "localhost";
$db['default']['username'] = "root";    
$db['default']['password'] = "password";    
$db['default']['database'] = "kalkun";    
$db['default']['dbdriver'] = "mysql";

You should change username and password based on your previous step.

Import gammu database schema

Since 0.2.9, Kalkun remove gammu database schema, you must import it manually first. Import gammu database schema (it's included on gammu source, eg. gammu/docs/sql/mysql.sql)

Again. you can do the import using MySQL console or MySQL GUI like phpMyAdmin.

If you're using MySQL console:
# mysql kalkun - u username -p < gammu/docs/sql/mysql.sql

Configure Daemon

The "daemon" task is to manage inbox and autoreply, it's called by php-cli whenever new message arrived, and it's configured on gammu-smsd configuration (smsdrc) at runonreceive directive.

Important: You must configure the "daemon" otherwise you will not get your inbox

For example on Unix (using shell script):

[smsd]
runonreceive = /opt/lampp/htdocs/kalkun/scripts/daemon.sh

Or if you using Windows (using batch file):

[smsd]
runonreceive = C:\xampp\htdocs\kalkun\scripts\daemon.bat

Warning: It always a good idea to move the scripts directory outside the www, so it’s not accessible from browser.

Set correct path on daemon.sh or daemon.bat:

# Configure this (use absolute path)
PHP=/usr/bin/php # php cli path
DAEMON=/path/to/kalkun/scripts/daemon.php # daemon.php path

Make sure that the daemon script is executable.
$ sudo chmod +x daemon.php daemon.sh daemon.bat

Change URI path in daemon.php, the default value is:

// Please configure this
$url = "http://localhost/kalkun";

Troubleshooting:
If somehow gammu-smsd fail to run the daemon script it will thrown error like this:
gammu-smsd[3665]: Process failed with exit status 126

Check permission and try to run the script manually.

Launch the installer

Now, you can launch the installer by open up your browser and go to http://url-to-kalkun/, you will redirected to http://url-to-kalkun/index.php/install and you will see the installation wizard there. The wizard will guide you to complete the installation, it should be easy.

Delete install folder

After installation complete, you should delete install folder otherwise you will redirected to installation wizard again. (Note: the installation wizard should do this automatically, but if it fail, you must delete it manually)

Setup timezone

Before run kalkun, you should set your timezone located in index.php, otherwise your time will be shown incorrectly and your sms will never be delivered.

Launch it

You are ready to login with default account, username is kalkun and password is kalkun, you should change the password after login for security issue.

That's it, you're done!

Clone this wiki locally