Install Gammu SMS Gateway In Ubuntu
In this tutorial will guide how to install Gammu SMS Gateway In Ubuntu Server
----->>Ubuntu Server 12.10 64 Bit
----->>CPU Dual Core, RAM 2GB and HDD 8GB (ATA HDD)
----->> Gammu 1.33.0
root@SMSGATEWAY:~# apt-get update
root@SMSGATEWAY:~# apt-get install autoconf gcc make cmake libxml2 libxml2-dev
libmysqlclient15-dev mysql-server mysql-client apache2 php5 libapache2-mod-php5
Start apache service :
root@SMSGATEWAY:~# /etc/init.d/apache2 restart
Search php modules and install
root@SMSGATEWAY:~# apt-cache search php5
root@SMSGATEWAY:~# apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick
php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode
php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
And then after install modules finish, restart apache service
root@SMSGATEWAY:~# /etc/init.d/apache2 restart
Install phpmyadmin (Optional) to easily manage database
root@SMSGATEWAY:~# apt-get install phpmyadmin
[gammu] port = /dev/ttyUSB0 connection = at115200root@SMSGATEWAY:/var/log/gammu# nano /etc/smsdrc
[gammu] port = /dev/ttyUSB0 connection = at115200 logfile = /var/log/gammu/gammu.log [smsd] #service = MYSQL service = SQL driver = native_mysql #driver = SQL logfile = /var/log/gammu/smsdlog commtimeout = 10 sendtimeout = 10 checksecurity = 0 checksignal = 1 pc = localhost user = user-database password = database-password database = database-nameCreate database :
bin="/usr/local/bin/gammu-smsd" configfile="/etc/smsdrc" pidfile="/var/run/gammu.pid" proc_name=`basename $0` PID=`cat $pidfile` function START_CMD { $bin -c $configfile -p $pidfile -d if [ "$?" != "0" ];then echo "ERROR - gammu did not start!" fi } function STATUS { PID=`cat $pidfile` if [ -n "$PID" ] ; then echo "$proc_name running PID: $PID" else echo "$proc_name not running" fi } # See how we were called. case "$1" in start) if [ -n "$PID" ]; then if [ "`ps -p "$PID" -o comm=`" = "" ]; then START_CMD STATUS else echo "Error - $proc_name already running!" STATUS fi else START_CMD STATUS fi ;; status) STATUS ;; stop) if [ -n "$PID" ] ; then echo "$proc_name stopping PID: $PID" kill $PID sleep 1 echo "" > $pidfile echo "$proc_name stopped" fi ;; restart|reload) $0 stop $0 start ;; *) echo $"Usage: $0 {start|stop|restart|reload|status}" exit 1 esac exit 0And then change permission :
To be continue for Web base interface to Send/Receive SMS
Congratulations you have successfully created a SMS Gateway
Copyright Albenet Hosting Tuesday 24-Apr-2018 All rights reserved.