Skip to main content

Installation Of SMS Server Tools 3 And PlaySMS On Debian Server

This tutorial will show you how you can set up an SMS server on Debian with playsms and smstools. In my example I have used an old Nokia 5140i with a USB datacable.

What we need before we start is apache2, mysql server, php5, lynx, wget, curl.

Now we install updates, and install dependencies:

apt-get update
apt-get upgrade
apt-get install apache2 mysql-server php5 php5-cli php5-cgi php-pear php-db phpmyadmin make gcc sendmail lynx wget curl

Now create a password for mysql root user, and remember it.



Installing playsms
adduser playsms
mkdir -p /var/www/playsms
mkdir -p /var/spool/playsms
mkdir -p /var/log/playsms
chown -R www-data /var/www/playsms
chown -R www-data /var/spool/playsms
chown -R www-data /var/log/playsms

And next download latest version of playSMS, find latest here, or grab my url: http://sourceforge.net/projects/playsms/

wget http://downloads.sourceforge.net/project/playsms/playsms/Version%200.9.5.2/playsms-0.9.5.2.tar.gz

This will extract playsms to /usr/local/src.

tar -zxvf playsms-0.9.5.2.tar.gz -C /usr/local/src

Now go to the following folder:

cd /usr/local/src/playsms-0.9.5.2/web

Now run the following commands:

Type mysql root password, when you are asked for the password.

cp -rR * /var/www/playsms
chown -R www-data /var/www/playsms
mysqladmin -u root -p create playsms

And now we import the mysql database from playsms, remember to change the path, if you install another version.

Type mysql root password, when you are asked for the password.

mysql -u root -p playsms < /usr/local/src/playsms-0.9.5.2/db/playsms.sql

Here we will make the config file, you have to fill out the fields:

cd /var/www/playsms
cp config-dist.php config.php
nano config.php

So it looks like this (replace 'my_password_for_mysql_root_user' with your password, and do not remove ' '):


// PHP PEAR DB compatible database engine:
// msql, mssql, mysql, oci8, odbc, pgsql, sqlite
$core_config['db']['type'] = 'mysql'; // database engine
$core_config['db']['host'] = 'localhost'; // database host/server
$core_config['db']['port'] = '3306'; // database port
$core_config['db']['user'] = 'root'; // database username
$core_config['db']['pass'] = 'my_password_for_mysql_root_user'; // database password
$core_config['db']['name'] = 'playsms'; // database name
$core_config['db']['pref'] = 'playsms'; // table's prefix without trailing underscore


// SMTP configuration
$core_config['smtp']['relm'] = ''; // yes, not realm, its relm
$core_config['smtp']['user'] = '';
$core_config['smtp']['pass'] = '';
$core_config['smtp']['host'] = 'localhost';
$core_config['smtp']['port'] = '25';


// Do not change anything below this line unless you know what to do

// -----------------------------------------------------------------

// you can turn on or off PHP error reporting
// on production level you should turn off PHP error reporting (set to 0), by default its on

//error_reporting(0);
//error_reporting(E_ALL ^ (E_NOTICE | E_WARNING | E_DEPRECATED));
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));

// logs directories
$apps_path['logs'] = '/var/log/playsms';

// log level: 0=disabled, 1=info, 2=warning, 3=debug, 4=verbose

// WARNING: log level 3 and 4 will also save sensitif information such as password for used gateway
$core_config['logstate'] = 0;

// 0 for single session login; 1 for multi session login
// multi session login is not secure because playsms leaves md5 crypted username and password

// on admin's computer
$core_config['multilogin'] = 0;

// are we using http or https ? the default is using http instead https
$core_config['ishttps'] = false;

?>
Now run the following commands:

cd /usr/local/src/playsms-0.9.5.2/bin
cp playsmsd playsmsd.php playsmsd_start /usr/local/bin/
cp playsms /etc/default/

Now we have to make sure that the program will start everytime the systems boots; do the following:

nano /etc/init.d/rc.local

Add on the bottom of the file (before exit if there's an exit command). This way playsmsd_start will start automatically on boot. Save and exit.

.... last line ....

/usr/local/bin/playsmsd_start



Install smstools
cd
wget http://smstools3.kekekasvi.com/packages/smstools3-3.1.14.tar.gz
tar -zxvf smstools3-3.1.14.tar.gz -C /usr/local/src
cd /usr/local/src/smstools3
make
make install

Now we make playsms and smstools work together:

cd /usr/local/src/playsms-0.9.5.2
cp contrib/smstools/smsd.conf /etc/

Now we have to edit the config file.

My Nokia 5140i with USB datacable is detected as ttyUSB0 so I don't have to edit the port, but if your phone is detected as something else, change it on line 27 to etc. ttyUSB1, ttyACM0

nano /etc/smsd.conf

My config file looks like this:

# Global configuration
devices = modem1
loglevel = 4
logfile = /var/log/sms/smstools.log
outgoing = /var/spool/sms/outgoing
checked = /var/spool/sms/checked
failed = /var/spool/sms/failed
incoming = /var/spool/sms/incoming
sent = /var/spool/sms/sent
delaytime = 6
errorsleeptime = 12
blocktime = 180
autosplit = 3
receive_before_send = yes
# Modem configuration # iTegno 3000 USB
[modem1]
#init =
device = /dev/ttyUSB0
incoming = yes
#pin = baudrate = 115200
Now run the following commands:

mkdir -p /var/spool/sms/checked
mkdir -p /var/spool/sms/failed
mkdir -p /var/spool/sms/incoming
mkdir -p /var/spool/sms/outgoing
mkdir -p /var/spool/sms/sent
mkdir -p /var/log/sms
chown -R www-data /var/spool/sms
update-rc.d sms3 defaults

Browse http://your-server-ip/playsms/ and log in using default administrator user:

Username: admin

Password: admin

Click Gateway, click Manage smstools, click (click here to activate).

Your server is now up and running, ready to be used.


source : http://www.howtoforge.com/installation-of-playsms-and-sms-server-tools-3-on-debian-server

Popular posts from this blog

How To Setup FTP server on centos 7 ( VSFTP )

From :  http://www.krizna.com/centos/setup-ftp-server-centos-7-vsftp/ FTP server is used to exchange files between computers over network . This guide helps you to setup ftp server on centos 7 . This guide contains configuration steps for both FTP and SFTP as well as user creation . Here i've used VSFTP package which is secure and less vulnerable . 1.  FTP Server 2.  SFTP Server 3.  User creation Setup FTP server on centos 7 Step 1 »  Update your repository and install VSFTPD package . [root@krizna ~]# yum check-update [root@krizna ~]# yum -y install vsftpd Step 2 »  After installation you can find  /etc/vsftpd/vsftpd.conf  file which is the main configuration file for VSFTP. Take a backup copy before making changes . [root@krizna ~]# mv /etc/vsftpd/vsftpd.conf /etc/vsftpd/ vsftpd.conf.org Now open the file and make changes as below [root@krizna ~]# nano /etc/vsftpd/vsftpd.conf Find this line  anonymous_enable=YES  ( Line no : 12 ) and change value to NO to disable anonymous FTP ac...

15 Linux lsof Command Examples (Identify Open Files)

lsof stands for List Open Files. It is easy to remember lsof command if you think of it as "ls + of", where ls stands for list, and of stands for open files. It is a command line utility which is used to list the information about the files that are opened by various processes. In unix, everything is a file, ( pipes, sockets, directories, devices, etc.). So by using lsof, you can get the information about any opened files. 1. Introduction to lsof Simply typing lsof will provide a list of all open files belonging to all active processes. # lsof COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME init 1 root cwd DIR 8,1 4096 2 / init 1 root txt REG 8,1 124704 917562 /sbin/init init 1 root 0u CHR 1,3 0t0 4369 /dev/null init 1 root 1u CHR 1,3 0t0 4369 /dev/null init 1 root 2u CHR ...

Privacy Policy

Another Pratama Privacy Statement What follows is the Privacy Statement for all Another Pratama websites (a.k.a. blogs) including all the websites run under the computer.pratama.us domain. Please read this statement regarding our blogs. If you have questions please ask us via our contact form. Email Addresses You may choose to add your email address to our contact list via the forms on our websites. We agree that we will never share you email with any third party and that we will remove your email at your request. We don’t currently send advertising via email, but in the future our email may contain advertisements and we may send dedicated email messages from our advertisers without revealing your email addresses to them. If you have any problem removing your email address please contact us via our contact form. Ownership of Information Another Pratama is the sole owner of any information collected on our websites. Comments/Message Boards Most Another Pratama websites contain com...