Professional Documents
Culture Documents
Table of Contents
Table of Contents
Table of Contents
of Contents
Introduction 1.1
Installation 1.2
Prerequisite 1.2.1
Upgrades 1.2.5
1
Introduction
Introduction
This is a book writing project for playSMS. The project is open to public. Everyone is invited to collaborate and make this
book complete.
The book will include installation and upgrade instruction for playSMS, how to configure playSMS, and how to use and
customize playSMS.
playSMS is a free and open source SMS management software. Example use of playSMS are as follows:
SMS gateway
Bulk SMS provider
Personal messaging system
Corporate and group communication tools
Visit playSMS project website at http://www.playsms.org for playSMS source codes, news and other technical information.
2
Installation
Installation
This chapter is about playSMS installation, upgrades and basic configuration.
3
Prerequisite
Prequisite
playSMS is a web-based software written in PHP and will be using a database server to work with. playSMS requires a
Linux based server and other softwares, products or SMS providers that actually send and receive SMS.
Installing and working with playSMS can be as simple as installing and managing Wordpress or Joomla for example, and
maybe even simpler than those applications.
In order to successfully install and use playSMS one must understand and fullfill some prerequisites.
GSM modem, single modem, single port, multiple modems or modem pools with multiple ports
Required only when you plan to use Kannel, Gammu, Gnokii or smstools gateway plugins
Internet connection
Required only when you plan to use Clickatell, Nexmo, Twilio, Infobip, BulkSMS and Uplink gateway plugins
LAN
Required when you plan to link 2 playSMS on different server in the same network using Uplink gateway plugin
Required when you plan to use Kannel and Kannel is on different server in the same network
4
Prerequisite
You can install, configured and start Postfix as your SMTP server
At least one console browser such as lynx, wget or curl should be installed
Downloaded playSMS package from SF.net or latest source code from Github
5
Ubuntu Setup
Ubuntu Setup
Before installing playSMS the server must be prepared by installing required applications.
In this chapter the preparation is written for Ubuntu with Apache2, MySQL and PHP.
1. Upgrade Ubuntu
sudo apt install apache2 libapache2-mod-php5 mysql-server php5 php5-cli php5-mysql php5-mcrypt php5-gd php5-imap
php5-curl
4. Restart apache2
6. Back to Linux console and setup MySQL server. Setup MySQL root password
MySQL first time password is empty, just press Enter when prompted.
We are ready to install playSMS. Next, you need to choose installation method. Choose one which is easier. For starter I
recommend to choose installation using provided install script.
6
Installation Using Install Script
Please note that before following below steps you need to cover all steps required in Ubuntu Setup.
sudo ./install-playsms.sh
/usr/local/bin/playsmsd start
Note:
After successful installation, please run command ps ax and see if playsmsd is running
ps ax | grep playsms
4069 pts/12 S 0:00 /usr/bin/php -q /usr/local/bin/playsmsd /etc/playsmsd.conf schedule
4071 pts/12 S 0:00 /usr/bin/php -q /usr/local/bin/playsmsd /etc/playsmsd.conf dlrssmsd
4073 pts/12 S 0:00 /usr/bin/php -q /usr/local/bin/playsmsd /etc/playsmsd.conf recvsmsd
4075 pts/12 S 0:00 /usr/bin/php -q /usr/local/bin/playsmsd /etc/playsmsd.conf sendsmsd
Stop here and review your installation steps when playsmsd is not running
7
Installation Using Install Script
8
Installation Without Install Script
Please note that before following below steps you need to cover all steps required in Ubuntu Setup.
2. Run getcomposer.sh
sudo ./getcomposer.sh
3. Create playSMS web root, log, lib and set ownership to user www-data or web server user
Assumed that your web root is /var/www/html and your web server user is www-data
Please note that there are Linux distributions using apache as web server user instead of www-data
Also note that there are Linux distributions set /var/www as web root instead of /var/www/html
4. Copy files and directories inside web directory to playSMS web root and set ownership to web server user
8. Just to make sure every paths are correct, please edit /etc/playsmsd.conf
nano /etc/playsmsd.conf
9
Installation Without Install Script
Make sure that PLAYSMS_PATH is pointing to a correct playSMS installation path (in this example to
/var/www/html/playsms )
Also Make sure that PLAYSMS_BIN is pointing to a correct playSMS daemon scripts path (in this example to
/usr/local/bin )
/usr/local/bin/playsmsd start
Note:
After successful installation, please run command ps ax and see if playsmsd is running
ps ax | grep playsms
4069 pts/12 S 0:00 /usr/bin/php -q /usr/local/bin/playsmsd /etc/playsmsd.conf schedule
4071 pts/12 S 0:00 /usr/bin/php -q /usr/local/bin/playsmsd /etc/playsmsd.conf dlrssmsd
4073 pts/12 S 0:00 /usr/bin/php -q /usr/local/bin/playsmsd /etc/playsmsd.conf recvsmsd
4075 pts/12 S 0:00 /usr/bin/php -q /usr/local/bin/playsmsd /etc/playsmsd.conf sendsmsd
Stop here and review your installation steps when playsmsd is not running
10
Upgrades
Upgrades
This sub-chapter contains information on how to upgrade playSMS.
11
Version 0.9.9.2 to 1.0
WARNING:
Prior to running above rm -rf /var/www/html/playsms/* command you must make sure that you have the backup
And also make sure that you type the command correctly in the correct location
4. Install playSMS version 1.0 in the same server with the same DB and the same web folder
6. Re-insert your backup playSMS DB sql file (DB sql file dump from previous installation) to the same DB
7. Upgrade DB
wget -c https://raw.githubusercontent.com/antonraharja/playSMS/master/db/playsms-upgrade_0.9.9.2_to_1.0.sql
12
Version 0.9.9.2 to 1.0
13
Version 1.0 to 1.1
Skim this page from top to bottom before start. Follow them correctly and in order.
Let's start.
Please note that the option --add-drop-table above is very important, do not miss it.
Download playsms-1.1.tar.gz from Sourceforge, visit playSMS Download for more information.
Run below commands to extract downloaded playSMS and replace old files:
14
Version 1.0 to 1.1
cd /var/www/html/playsms
sudo rm -rf plugin/gateway/gnokii
sudo rm -rf plugin/gateway/msgtoolbox
5. Upgrade DB
6. Start playSMS daemon, and make sure its started (PIDS are displayed)
15
Upgrade to Version 1.3.1
Please note that upgrade instructions in this article are not compatible with playSMS 1.0 and before.
Skim this page from top to bottom before start. Follow them correctly and in order.
Let's start.
Please note that the option --add-drop-table above is very important, do not miss it.
Download playsms-1.3.1.tar.gz from Sourceforge, visit playSMS Download for more information.
Run below commands to extract downloaded playSMS and replace old files:
4. Upgrade DB
16
Upgrade to Version 1.3.1
5. Start playSMS daemon, and make sure its started (PIDS are displayed)
17
Version 1.3.1 to 1.4
Skim this page from top to bottom before start. Follow them correctly and in order.
Let's start.
Please note that the option --add-drop-table above is very important, do not miss it.
Download playsms-1.4.tar.gz from Sourceforge, visit playSMS Download for more information.
Run below commands to extract downloaded playSMS and replace old files:
4. Upgrade DB
18
Version 1.3.1 to 1.4
5. Start playSMS daemon, and make sure its started (PIDS are displayed)
19
Version 1.4 to 1.4.2
Skim this page from top to bottom before start. Follow them correctly and in order.
Let's start.
Please note that the option --add-drop-table above is very important, do not miss it.
Download playsms-1.4.2.tar.gz from Sourceforge, visit playSMS Download for more information.
Run below commands to extract downloaded playSMS and replace old files:
4. Upgrade DB
20
Version 1.4 to 1.4.2
5. Start playSMS daemon, and make sure its started (PIDS are displayed)
21
Gateway Installation
Gateway Installation
Gateway installation.
22
Kannel
Kannel
Kannel.
23
Kannel
1. Install Kannel
wget -c https://raw.githubusercontent.com/antonraharja/playSMS/master/contrib/kannel/kannel.conf
sudo cp kannel.conf /etc/kannel/
ls -l /etc/kannel/
5. Edit /etc/kannel/kannel.conf . Replace http://CHANGE_THIS_TO_YOUR_PLAYSMS_URL with your playSMS URL, for example
with http://localhost/playsms
In the example kannel.conf you will see several option values with all uppercase, such as
KANNELADMIN_CHANGE_THIS, you have to change them. Of course you need to understand how to configure
kannel.conf properly, how to add modems and SMSCs when needed.
7. Only after you have configured kannel.conf to suit your needs and your setups then you may restart Kannel
ps ax | grep box
netstat -lnpt
tail -f /var/log/kannel/kannel.log
24
Kannel
25