Centos 7 Kannel 1.4.5 and MariaDB 10.3 Install and Configure 2018 SEP

https://vxplains.blogspot.com/2017/11/how-to-install-kannel-on-centos-7.
https://redmine.kannel.org/issues/778 (patch)

yum update
yum groupinstall 'Development tools' -y
yum install openssl-devel openjade jadetex docbook-style-dsssl texlive-dvips transfig ImageMagick libxml2-devel bison-devel byacc texlive-collection-xetex -y

======================================================
Kannel do not work with bison 3 error (important)
install bison version 2.7 as in http://geeksww.com/tutorials/miscellaneous/bison_gnu_parser_generator/installation/installing_bison_gnu_parser_generator_ubuntu_linux.php
Remember to redo the unzipping of the files and configure again.

cd /root
wget http://ftp.gnu.org/gnu/bison/bison-2.7.tar.gz
tar -xvzf bison-2.7.tar.gz
cd bison-2.7
./configure --prefix=/usr/local/bison --with-libiconv-prefix=/usr/local/libiconv/
make
make install

======================================================
vi /etc/yum.repos.d/MariaDB10.repo
# MariaDB 10.3 CentOS repository list – created 2018-09-10 19:28 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.3/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

yum remove -y MariaDB-server MariaDB-client MariaDB-devel MariaDB-shared MariaDB-compat MariaDB-common
vi /etc/yum.repos.d/MariaDB10.repo
rm -rf /var/cache/yum/x86_64/7/mariadb/
yum update
yum install -y MariaDB-server MariaDB-client MariaDB-devel MariaDB-shared MariaDB-compat MariaDB-common
vi /usr/lib/systemd/system/mariadb.service
ProtectHome=false
systemctl daemon-reload
systemctl restart mariadb

if innodb error
vi /etc/my.cnf (add)
innodb_log_file_size=48M

rpm -qa|grep MariaDB

MariaDB-compat-10.3.9-1.el7.centos.x86_64
MariaDB-client-10.3.9-1.el7.centos.x86_64
MariaDB-shared-10.3.9-1.el7.centos.x86_64
MariaDB-devel-10.3.9-1.el7.centos.x86_64
MariaDB-common-10.3.9-1.el7.centos.x86_64
MariaDB-server-10.3.9-1.el7.centos.x86_64
======================================================
(verify)

yum install openssl-devel
yum install libxml2-devel
yum install bison-devel
yum install install texlive-*

vi /usr/share/texlive/texmf/web2c/texmf.cnf
hash_extra.jadetex = 15000
hash_extra.pdfjadetex = 15000
pool_size.jadetex = 500000
pool_size.pdfjadetex = 500000
string_vacancies.jadetex = 45000
string_vacancies.pdfjadetex = 45000
max_strings.jadetex = 55000
max_strings.pdfjadetex = 55000
pool_free.jadetex = 47500
pool_free.pdfjadetex = 47500
nest_size.jadetex = 500
nest_size.pdfjadetex = 500
param_size.jadetex = 1500
param_size.pdfjadetex = 1500
save_size.jadetex = 5000
save_size.pdfjadetex = 5000
stack_size.jadetex = 1500
stack_size.pdfjadetex = 1500

cd /root
wget -c https://redmine.kannel.org/attachments/download/322/gateway-1.4.5.tar.gz –no-check-certificate
tar -zxvf gateway-1.4.5.tar.gz
cd gateway-1.4.5
wget https://redmine.kannel.org/attachments/download/317/kannel-mariadb.patch –no-check-certificate
patch < kannel-mariadb.patch

any one option you required
./configure –with-mysql –disable-wap
./configure –prefix=/usr/local/kannel –with-mysql –disable-wap
./configure –prefix=/usr/local/kannel –with-mysql –with-mysql-dir=lib64 –disable-wap
./configure –prefix=/usr/local/kannel –with-mysql –with-mysql-dir=/usr/include/mysql –disable-wap

make

[After make command if you get Latex error like:
File ‘ulem.sty’ not found ]

To fix this error type the following command:-
yum install ‘tex(ulem.sty)’
yum install ‘tex(mlnames.sty)’

if other font error

yum install install texlive-*

chmod 0755 gw-config
make install

//Congrats your kannel 1.4.5 has been installed in the following directory (/usr/local/sbin)

Now make directory on /etc
Command
#cd /etc
#mkdir kannel

Then Go to kannel directory
# cd /etc/kannel
Then create a kannel.conf file

Download the kannel.conf file from the link below:-

https://drive.google.com/open?id=1zlepZ6aLnle8SWrg4fVA1nzXB3JE30up

To start the kannel run the following command as follows:-

# /usr/local/sbin/bearerbox -v 0 /etc/kannel/kannel.conf
# /usr/local/sbin/smsbox -v 0 /etc/kannel/kannel.conf

 

firewall-cmd --permanent --zone=public --add-port=13000/tcp 
firewall-cmd --permanent --zone=public --add-port=13013/tcp 

To check if the kannel is running or not type the following command on your browser:-

http://127.0.0.1:13000/status?password=bar

To check if message is going through the kannel, hit the following url in your browser.

localhost:13013/cgi-bin/sendsms?smsc=yoursmsc&user=tester&pass=foobar&to=9851117234&text=Test+Kannel

smsc=your name defined in kannel.conf

Congrats you setup your kannel-sms-gateway


<code>

vi /usr/bin/kannel.sh
#!/bin/sh
#
# gateway This shell script takes care of starting and stopping
# the Kannel WAP gateway (bearer/wapbox)
#
# chkconfig: 2345 97 03
# description: Start and stop the Kannel WAP gateway used to fetch \
# some WML content from a Web server & compile it \
# into WMLC mobile phone bytecode.
# probe: true

# Use start-stop-daemon
ver=1.40
BBOX=/usr/local/sbin/bearerbox
SBOX=/usr/local/sbin/smsbox
START=”/usr/sbin/start-stop-daemon –start –background –quiet –exec”
STOP=”/usr/sbin/start-stop-daemon –stop –quiet –oknodo –exec”
CONF=/etc/kannel/kannel.conf
[ $# -eq 2 ] && ver=$2

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = “no” ] && exit 0

[ -x $BBOX ] || exit 0

[ -x $SBOX ] || exit 0

[ -f $CONF ] || exit 0

RETVAL=0

# See how we were called.
case “$1” in
start)
# Start daemons.
echo -n “Starting bearer service (gateway kannel $ver): ”
$START $BBOX — $CONF
RETVAL1=$?
sleep 1 # Sleep for a while before we try to start smsbox
echo
echo -n “Starting smsbox service (gateway kannel $ver): ”
$START $SBOX — $CONF
RETVAL2=$?
echo
echo
[ $RETVAL1 -eq 0 -a $RETVAL2 -eq 0 ] && touch /var/lock/subsys/gateway ||\
RETVAL=1
;;
stop)
# Stop daemons.
echo -n “Shutting down smsbox (kannel $ver): ”
$STOP $SBOX
RETVAL2=$?
echo
echo -n “Shutting down bearerbox (kannel $ver): ”
$STOP $BBOX
RETVAL1=$?
echo
[ $RETVAL1 -eq 0 -a $RETVAL2 -eq 0 ] && rm -f /var/lock/subsys/gateway
echo “”
;;
status)
status bearerbox
status smsbox
exit $?
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo “Usage: named {start|stop|status|restart}”
exit 1
esac
exit $RETVAL

</code>

Kannel SMS Gateway Delivery Reports in mySQL via sqlbox

Howto configure your Local SMS HTTP Gateway using KANNEL on Ubuntu

https://github.com/pruiz/kannel-sqlbox

Sending Unicode SMS via Kannel