HOWTO: Compile Kannel on Ubuntu / Kubuntu 8.04
Hey everyone, I am putting together a multi-part post on how to compile Kannel as well as connect it to an SMPP Server and send a few messages through it. I will be using Kubuntu 8.04 for the tutorial but it should apply to most Linux distro’s.
Step 1 – Satisfying requirements / dependencies
Install CVS client:
sudo apt-get install cvs
Build dependencies:
Install build tools (gcc, mac, g++, etc. Not all necessary but you should have them!)
- sudo apt-get install build-essential
Install required Kannel dependencies (there are obviously way more, but this is all required on Kubuntu 8.04)
- sudo apt-get install libxml2-dev
Install optional Kannel dependencies (These are only required if you would like to use SSL enabled servers, alternate DLR storage options etc. For the purposes of this example I will enable our Kannel build for SSL and PostgreSQL DLR storage)
- sudo apt-get install openssl-dev
- sudo apt-get install libpq-dev
Step 2 – Getting the source of Kannel.
Option a) Downloading latest stable
Visit the kannel download page and download the source as gzip tarball (or bzip2 tarball if you prefer). In the directory you downloaded execute:
tar zxvf gateway-X.X.X.tar.gz
Option b) Getting the latest CVS (my preferred method)
You will need a CVS client installed.
Log in using the following command (just press Enter when it asks for
a password):
- cvs -d:pserver:anonymous@cvs.kannel.org:/home/cvs login
Check out the current version of the Kannel gateway:
- cvs -d:pserver:anonymous@cvs.kannel.org:/home/cvs co -d gateway-cvs gateway
Once the gateway is checked out, it will be in the gateway-cvs directory (as specified above)
Step 3 – Building Kannel
Change directory to the directory you downloaded the source to (gateway-X.X.X or gateway-cvs)
Execute:
- ./configure –with-pgsql –enable-ssl
This should configure the build correctly with OpenSSL and PostgreSQL support.
Once that’s done, execute:
- make
This will build the binaries for Kannel, if you want to install them system wide at this point you can by executing:
- sudo make install
You now have the Kannel binaries built for your use. These include smsbox, wapbox and bearerbox. You can either consult the Kannel user guide for how to use these or wait for my next post where I will cover setting and starting up Kannel (and some architecture stuff
).
2009/06/22 - 4:39 pm
i have successfully compiled Kannel 1.4.3 on my Ubuntu 8.10, how do i automate the startup so that when i turn on my pc it runs automatically.