Senin, 04 Oktober 2010

Kalkun 0.1.3beta on Ubuntu 8.04

Ok, after kalkun review, now i want to show you how to install kalkun 0.1.3beta on Ubuntu 8.04 (my favorite distro). This tutorial including how to install and configure all software that is required for kalkun to work like apache, php, mysql, gammu, etc.

OK, let’s start it.

  1. Install all required software, you can get it from repository. You might want to edit your repository source first.
    $ sudo vim /etc/apt/sources.list

    Add the following line (this is PPA for Michal Cihar, you will get latest gammu version from this) :
    deb http://ppa.launchpad.net/nijel/ppa/ubuntu hardy main
    deb-src http://ppa.launchpad.net/nijel/ppa/ubuntu hardy main

    Update (23-11-2009):
    I’ve been check up this PPA today, and looks like hardy is no longer listed, you can move on intrepid instead, and the line become :
    deb http://ppa.launchpad.net/nijel/ppa/ubuntu intrepid main
    deb-src http://ppa.launchpad.net/nijel/ppa/ubuntu intrepid main

    Next, add key server for this PPA.
    $ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 06ED541C
    .
    Update repository :
    $ sudo apt-get update

    OK, now you’re ready to install all required software :
    $ sudo apt-get install apache2 php5 libapache2-mod-php5 php5-mysql mysql-server-5.0 mysql-client-5.0 libmysqlclient15-dev libmysqlclient15off gammu gammu-smsd

  2. Now, we will configure gammu and gammu-smsd
    FYI, i’m using Samsung SGH-E590 as my GSM modem.
    Connect phone to PC, check with dmesg ot tail -f /var/log/messages to see in what port phone connected, in my case it’s /dev/ttyACM0.
    .
    Next create gammu config to check the phone supported or not (you might want to use sample config of gammurc located in /usr/share/doc/gammu/examples/config/).
    .
    $ sudo vim /root/.gammurc

    [gammu]
    port = /dev/ttyACM0
    connection = at115200
    logfile = gammulog
    logformat = textall
    use_locking = yes

    .
    Identify the phone :
    $ sudo su
    $ gammu identify

    .
    If your phone supported and your config is correct, you will see phone information like Manufacture, Model, Firmware, IMEI, SIM IMSI, etc.
    .
    If error appeared, you phone might currently not supported or your config is incorrect, check gammu phone database to see list of supported phone.
    .
    Next, let’s configure gammu-smsd.
    $ sudo vim /etc/gammu-smsdrc

    # This is same as gammurc config
    [gammu]
    port = /dev/ttyACM0
    connection = at115200

    [smsd]
    PIN = 1234
    service = mysql
    DeliveryReport = sms
    logfile = /etc/smsdlog
    debuglevel = 255

    # Change this to your mysql config
    User = root
    Password = password
    PC = localhost
    Database = kalkun

  3. Get kalkun 0.1.3beta source code here, extract it to /var/www/html (this is default www-root for Ubuntu).
    .
    Now, we will configure kalkun.
    Create database named kalkun :
    $ mysql -u root -p
    mysql> CREATE DATABASE kalkun;
    mysql> quit
    .
    Edit kalkun database config in system/application/config/database.php, change database value to ‘kalkun’, username and password is depend on your mysql config.Now, let’s install it, open up your browser and go to http://localhost/kalkun/index.php/install, you will get installation window and kalkun will check the requirement before you install.
    installation

    Kalkun 0.1.3beta installation

    That’s it, now kalkun is already installed. Don’t forget to run the smsd daemon :
    $ sudo /etc/init.d/gammu-smsd start

  4. There you have a simple (really simple) web based SMS management, hope it usefull for someone out there…:)

0 komentar:

Posting Komentar