Skip to content

Instantly share code, notes, and snippets.

@rabihmb
Forked from kewogc/gist:1d679c6c83977d69106f
Last active August 31, 2017 21:13
Show Gist options
  • Save rabihmb/af94b04d5c6005feab7c9b52cb863e08 to your computer and use it in GitHub Desktop.
Save rabihmb/af94b04d5c6005feab7c9b52cb863e08 to your computer and use it in GitHub Desktop.
HOW TO INSTALL KANNEL ON UBUNTU
$ uname -a
$ lsb_release -a
$ locale-gen en_US
$ locale-gen en_US.UTF-8
$ apt-get -y --force-yes remove ntpdate
$ apt-get -y --force-yes install ntp
$ /etc/init.d/ntp restart
$ dpkg-reconfigure tzdata
# Add PPA Repository
$ apt-get -y --force-yes install python-software-properties
$ apt-get -y --force-yes update
# apt-fast
$ add-apt-repository ppa:tldm217/tahutek.net
$ apt-get -y --force-yes update
$ apt-get -y --force-yes install axel
$ apt-get -y --force-yes install apt-fast
# Build System
$ apt-fast -y --force-yes install nano wget cvs subversion curl git-core unzip autoconf automake1.9 libtool flex debhelper pkg-config libpam0g-dev intltool automake checkinstall docbook docbook-xsl build-essential libpcre3 libpcre3-dev libc6-dev g++ gcc autotools-dev bison libncurses5-dev m4 tex-common texi2html texinfo texlive-base texlive-base-bin texlive-latex-base libxml2-dev
# Open SSL
$ $ apt-fast -y --force-yes install openssl libssl-dev
# Apache
$ apt-fast -y --force-yes install apache2 apache2-dev apache2.2-common apache2.2-bin apache2-utils apache2-doc
$ a2enmod php5 rewrite actions include suexec ssl deflate auth_mysql
$ /etc/init.d/apache2 restart
# MySql
$ apt-fast -y --force-yes install mysql-server mysql-client libmysqlclient-dev libmysql++-dev
# PHP
$ apt-fast -y --force-yes install php5 php5-dev php5-common php-pear php5-xcache php5-curl php5-cli php5-cgi php5-gd php5-mysql php5-suhosin php5-memcache php5-imagick php5-sqlite php5-xmlrpc php5-xsl php5-imap php5-mcrypt php5-ffmpeg php5-tidy php5-mhash php5-memcache php5-pspell php5-recode php5-snmp php5-sqlite
$ apt-fast -y --force-yes install phpmyadmin
# Installing Kannel Gateway
$ groupadd kannel
$ useradd -g kannel kannel
$ cd /usr/local
$ mkdir /usr/local/src/kannel
$ cd /usr/local/src/kannel
$ svn co https://svn.kannel.org/gateway/trunk
$ mv trunk gateway
$ cd /usr/local/src/kannel/gateway
$ ./configure --prefix=/usr/local/kannel --with-mysql --with-mysql-dir=/usr/lib/mysql/ --enable-debug --enable-assertions --with-defaults=speed --disable-localtime --enable-start-stop-daemon --enable-pam
$ touch .depend
$ make depend
$ make
$ make bindir=/usr/local/kannel install
$ cd
# Sql Box Installation
$ cd /usr/local/src/kannel
$ svn co https://svn.kannel.org/sqlbox/trunk
$ mv trunk sqlbox
$ cd /usr/local/src/kannel/sqlbox
$ ./bootstrap
$ ./configure --prefix=/usr/local/kannel --with-kannel-dir=/usr/local/kannel
$ make
$ make bindir=/usr/local/kannel/sqlbox install
$ cd
# SMPP Box Installation
$ cd /usr/local/src/kannel
$ svn co https://svn.kannel.org/opensmppbox/trunk
$ mv trunk smppbox
cd /usr/local/src/kannel/smppbox
$ ./configure --prefix=/usr/local/kannel --with-kannel-dir=/usr/local/kannel
$ make
$ make bindir=/usr/local/kannel/smppbox install
$ cd
# Manage & Check Log files
$ mkdir /etc/kannel
$ mkdir /var/log/kannel
$ mkdir /var/log/kannel/gateway
$ mkdir /var/log/kannel/smsbox
$ mkdir /var/log/kannel/wapbox
$ mkdir /var/log/kannel/smsc
$ mkdir /var/log/kannel/sqlbox
$ mkdir /var/log/kannel/smppbox
$ chmod 755 /var/log/kannel
$ cp /usr/local/src/kannel/gateway/gw/smskannel.conf /etc/kannel/kannel.conf
$ cp /usr/local/src/kannel/gateway/debian/kannel.default /etc/default/kannel
$ cp /usr/local/src/kannel/gateway/debian/kannel.init /etc/init.d/kannel
$ cp /usr/local/src/kannel/sqlbox/example/sqlbox.conf.example /etc/kannel/sqlbox.conf
$ cp /usr/local/src/kannel/smppbox/example/opensmppbox.conf.example /etc/kannel/opensmppbox.conf
$ cp /usr/local/src/kannel/smppbox/example/smpplogins.txt.example /etc/kannel/smpplogins.txt
$ chmod 777 /etc/init.d/kannel
$ update-rc.d kannel defaults
# Clean Installtion Files
$ du -sh /var/cache/apt/archives
$ apt-get -y --force-yes clean
# Open Terminal and run following command to test your kannel
$ /usr/local/kannel/sbin/bearerbox -v 0 /etc/kannel/kannel.conf
$ /usr/local/kannel/sbin/smsbox -v 0 /etc/kannel/kannel.conf
$ /usr/local/kannel/sbin/wapbox -v 0 /etc/kannel/kannel.conf
$ /usr/local/kannel/sbin/sqlbox -v 0 /etc/kannel/kannel.conf
$ /usr/local/kannel/sbin/opensmppbox -v 0 /etc/kannel/opensmppbox.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment