Skip to content

Instantly share code, notes, and snippets.

@india-india
Last active December 23, 2018 13:10
Show Gist options
  • Save india-india/cb56e465c26f63f31f6e5ecb75d5e76b to your computer and use it in GitHub Desktop.
Save india-india/cb56e465c26f63f31f6e5ecb75d5e76b to your computer and use it in GitHub Desktop.
HOW TO INSTALL KANNEL ON UBUNTU V18
sudo apt-get update
sudo apt-get upgrade
//Apache 2
sudo apt install apache2
sudo ufw app list
sudo ufw allow 'Apache'
sudo ufw status
sudo ufw enable
sudo systemctl status apache2
hostname -I
http://your_server_ip
apache2 -v
sudo apt-get install php
php -v
sudo apt install mysql-server
mysql -v
sudo mysql_secure_installation
sudo apt-get install -y nano wget cvs subversion curl git-core zip unzip autoconf automake 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 openssl libssl-dev software-properties-common axel mysql-client libmysqlclient-dev
sudo apt-get remove bison
wget --no-check-certificate https://ftp.gnu.org/gnu/bison/bison-1.28.tar.gz
tar -xvf bison-1.28.tar.gz
rm bison-1.28.tar.gz
cd bison-1.28
./configure --prefix=/usr/local/bison --with-libiconv-prefix=/usr/local/libiconv/
make
make install
ln -s /usr/local/bison/bin/bison /usr/bin/bison
ln -s /usr/local/bison/bin/yacc /usr/bin/yacc
groupadd kannel
useradd -g kannel kannel
mkdir /usr/local/src/kannel
cd /usr/local/src/kannel
wget --no-check-certificate https://www.kannel.org/download/1.4.5/gateway-1.4.5.zip
unzip gateway-1.4.5.zip
rm gateway-1.4.5.zip
mv gateway-1.4.5 gateway
cd 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
chmod 0755 gw-config
mkdir /usr/local/kannel
make bindir=/usr/local/kannel install
cd
mkdir /usr/local/src/kannel/sqlbox
cd /usr/local/src/kannel/sqlbox
cp -r /usr/local/src/kannel/gateway/addons/sqlbox/* ./
./bootstrap
./configure --prefix=/usr/local/kannel --with-kannel-dir=/usr/local/kannel
make
make bindir=/usr/local/kannel/sqlbox install
cd
mkdir /usr/local/src/kannel/smppbox
cd /usr/local/src/kannel/smppbox
cp -r /usr/local/src/kannel/gateway/addons/opensmppbox/* ./
./configure --prefix=/usr/local/kannel --with-kannel-dir=/usr/local/kannel
make
make bindir=/usr/local/kannel/smppbox install
cd
mkdir /etc/kannel
mkdir /var/log/kannel
cd /var/log/kannel
mkdir gateway smsbox wapbox smsc sqlbox 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
du -sh /var/cache/apt/archives
apt-get -y clean
mysql
create database kannel;
CREATE USER 'kannel'@'localhost' IDENTIFIED BY 'Dollorinfotech@5050';
GRANT ALL PRIVILEGES ON * . * TO 'kannel'@'localhost';
GRANT ALL PRIVILEGES ON kannel.* TO 'kannel'@'localhost';
FLUSH PRIVILEGES;
quit;
/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 &
ps -aux | grep box
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment