You are on page 1of 4

DESCRIPTION ----------This document explain about how to install and setup playSMS REQUIREMENT ----------Minimum Required Hardware - Web

server capable hardware Minimum Required Software - Operating System Linux (install on MS Windows or BSD is also possible) - Web Server (for example Apache2 or lighttpd) - Database Server MySQL 5.x.x or latest stable release - PHP 5.x.x or latest stable release with mysql module enabled and CLI version i nstalled - PHP gettext extension (this is a must for text translation) - PHP multibyte string function (should be able to call mb_convert_encoding) - Access to SMTP server (playSMS will use this to send email) - lynx, wget or curl, a console web browser (example scripts require lynx) - Downloaded playSMS package from SF.net or latest source code from Github - Selected gateway application. Recommended to use Kannel or SMS Server Tools Minimum Required Server Administrator (or Developer) - Understand howto make sure installed PHP has MySQL module enabled/loaded - Understand howto create/drop MySQL database - Understand howto insert SQL statements into created database - Basic knowledges to operate and manage Linux (skill to navigate in console mod e) INSTALLATION on Linux --------------------Note: - I assumed that you have root priviledge. If you dont, please understand that I 'm trying to guide you to install playSMS on /var/www/playsms under user 'playsms'. You may use your own username, your own home directory or any preferred directory. - This installation instructions might be working for other *NIX based operating system. I knew someone installing playSMS on FreeBSD and it worked. playSMS Web Interface step-by-step installation: 1. It is important to meet all minimum requiments above. Those application shou ld also be working and running properly 2. Setup a Linux user named 'playsms' to manage playSMS. Make sure that you log ged in as root. # adduser playsms # passwd playsms Note: on some Linux distributions adduser and passwd are combined (eg: Debia n and Ubuntu) 3. On most Linux distributions point 2 above will create a user and a group nam ed 'playsms' with home directory /home/playsms (this directory does not mean anything to playSMS)

4. Create playSMS web root, spool and log and set ownership to user www-data or web server user # 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 Note: There are Linux distributions using 'apache' as web server user instea d of 'www-data'. 5. Extract playSMS package somewhere (Usually in /usr/local/src). # tar -zxvf playsms-x.x.x.tar.gz -C /usr/local/src Note: x.x.x may vary according to the package name you've download. 6. Copy files and directories inside 'web' directory to playSMS web root and se t ownership again to user www-data or web server user # cd /usr/local/src/playsms-x.x.x/web # cp -rR * /var/www/playsms # chown -R www-data /var/www/playsms Note: Assumed your web server user is www-data, see notes on point 4 above. 7. Setup database (import database) # mysqladmin -u root -p create playsms # mysql -u root -p playsms < /usr/local/src/playsms-x.x.x/db/playsms.sql Note: You don't need to use MySQL root access nor this method to setup playS MS database, but this is beyond our scope. You should read MySQL manual for cus tom installation method or howto insert SQL statements into existing database. 8. Copy config-dist.php to config.php and then edit config.php # cd /var/www/playsms # cp config-dist.php config.php # mcedit config.php or # vi config.php Note: Please read and fill all required fields with coutious. 9. Enter bin directory, copy playsms, playsmsd* and sendsmsd* # cd /usr/local/src/playsms-x.x.x/bin # cp playsms /etc/default/ # cp playsmsd* sendsmsd* /usr/local/bin/ Note: Please note the difference between playsms and playsmsd, one is a conf ig file the other are playSMS daemon scripts. 10. Just to make sure every paths are correct, please edit /etc/default/playsms # vi /etc/default/playsms Make sure that PLAYSMS_PATH is pointing to a correct playSMS installation pa th, and also make sure that PLAYSMS_BIN is pointing to a correct playSMS daemon scripts path. 11. Look for rc.local on /etc and its subdirectories (usualy /etc, /etc/init.d o r /etc/rc.d/init.d). If you found it then edit that rc.local and put: "/usr/local/bin/playsmsd_start" (without quotes) on the bottom of the file (before exit if theres an exit command). This way

playsmsd_start will start automatically on boot. Note: Just like any other steps above you need 'root' access to do this. 12. Run playsmsd_start manually # /usr/local/bin/playsmsd_start Note: - after that please do a ps -ax and see if playsmsd and sendsmsd are running - stop here and review your installation steps when playsmsd and sendsmsd ar en't running - consider to ask question in playSMS mailing list when you encountered any problem 13. Browse http://localhost/playsms/ and login using default administrator user username: admin password: admin 14. At this point you should be able to login to playSMS web interface and manag e playSMS Please continue to follow INSTALL_SMSSERVERTOOLS to use SMS Server Tools (smstoo ls3) as your gateway module, or follow INSTALL_KANNEL if you want to use Kannel instead. Gnokii and Gammu also supported, please follow INSTALL_GNOKII if you want to use Gnokii as your gateway module, or INSTALL_GAMMU if you want to use Gammu instead. As of playSMS version 0.9.5 using Kannel or SMS Server Tools (smstools3) is pref errable.

INSTALL SMS SERVER TOOLS -----------------------Per date this manual written, we're using SMS Server Tools version 3.1.14: http://smstools3.kekekasvi.com/packages/smstools3-3.1.14.tar.gz Step by step how to install SMS Server Tools for playSMS as follows: 1. Extract SMS Server Tools source package somewhere (eg: /usr/local/src) # tar -zxvf smstools3-3.1.14.tar.gz -C /usr/local/src 2. Enter the extracted source codes directory and execute make to compile follo wed by installing smstools3 # cd /usr/local/src/smstools3 # make # make install Please note that you should be already install the C compiler and other rela ted libraries required by smstools3. One easy step to do this in Ubuntu (or Debi an) is by running this command before smstools3 installation: # apt-get install build-essential

4. Back to playSMS source directory, copy smsd.conf from contrib/smstools/ to / etc # cd <playsms source codes directory> # cp contrib/smstools/smsd.conf /etc/ 5. Make changes on /etc/smsd.conf. By default the configuration should be compa tible with most wavecom modems with Serial to USB converter 6. Create important directories for smstools3 # mkdir -p /var/spool/sms # cd /var/spool/sms # mkdir checked failed incoming outgoing sent # mkdir -p /var/spool/smsbackup # cd /var/spool/smsbackup # mkdir checked failed incoming outgoing sent # mkdir -p /var/log/sms/stats 7. Change permissions on some directories so that web server user can write fil es on it # chmod -R 775 /var/spool/sms /var/spool/smsbackup or # chown -R root:www-data /var/spool/sms /var/spool/smsbackup Please note that on some Linux distribution the web server user is 'apache' instead of 'www-data' 8. Enter playSMS from web and login as administrator user and activate Gateway smstools Note if you are using Ubuntu or Debian and alike: - To get smstools3 running automatically on every boot, type this command: # update-rc.d sms3 defaults -Anton Raharja