Membangun SMS Gateway dengan Gnokii dan PlaySMS
Diambil dari Manual PlaySMS :
WARNING !!!
———–
PlaySMS is not save for kids!
But if you’re a kid, and you can meet requirement’s below, you can use PlaySMS, savely!
Kids must:
1. Not nervous when login to Linux console remotely
2. Able to read and understand README first, INSTALL and then FAQ in this package
3. Able to use Yahoo! to send join PlaySMS mailing list, and ask good questions
4. Be serious after this WARNING
REQUIREMENT
———–
Download PlaySMS : http://playsms.sourceforge.net/
Download Gnokii : http://www.gnokii.org/
Minimum Required Hardware
- Web servers hardware
- Disk freespace for software and data disk at least 10 MB
Minimum Required Software
- Operating System *NIX based (Linux preferred)
- Web Server (Apache preferred http://httpd.apache.org)
- Database Server MySQL 3.23.47 or latest stable release (http://www.mysql.com)
- PHP 4.2.2 or latest stable release with mysql module enabled and CGI version
(http://www.php.net)
Minimum Required Server Operator (or Developer)
- Understand howto make sure installed PHP has MySQL module enabled (phpinfo)
- Understand howto create/drop MySQL database
- Understand howto insert SQL statement into created database
- OK to read README, INSTALL, FAQ and other docs
Gnokii’s Installation:
1. Extract gnokii source package somewhere (eg: /usr/local/src)
2. Configure it to make sure installation path is in /usr/local
# ./configure –prefix=/usr/local
Note: if you want to change to another directory, you better understand how to
read source of /path_to_source_of_playsms/bin/* files written in bash script
3. Make and make install, these actions should install gnokii to /usr/local
# make
# make install
4. Enter directory named smsd in gnokii source directory, compile and install smsd
Note: if you use gnokii version < 0.6.0 you'll have to make libfile.so not libfile.la
# cd smsd
# make
# make libfile.la
# make install
Note: for those whose having trouble compiling smsd will have to edit the
Makefile file manually, insert comments mark on libmysql.so and libpq.so parts
5. And now from gnokii’s source directory, enter to Docs/sample, there you
can found file named gnokiirc, copy it to ~/.gnokiirc (home of root) and edit it
# cd Docs/sample
# cp gnokiirc ~/.gnokiirc
Note: usually you just have to edit the port and model part only, change it
to suit your system
6. Test your gnokii, plug in your cellphone/gsm modem cable to the computer, or
connect via IrDA, and then type:
# gnokii –identify
Note: you should see gnokii identified your cellphone/gsm modem, if you dont
see it, update your ~/.gnokiirc to suit your need
7. Back to PlaySMS source directory. Create smsd cache and logs directory and
make it writable to the web servers user
# mkdir /usr/local/cache
# mkdir /usr/local/cache/smsd
# mkdir /usr/local/cache/logs
# touch /usr/local/cache/logs/smsd_logs
# chmod -R 777 /usr/local/cache
Note:
- make it writable to the world (chmod -R 777) just to simplify installation
- it is better if you know what is the web server’s user (eg: ‘nobody’)
and instead chmod -R 777 you use:
# chown -R nobody /usr/local/cache
8. Enter bin directory and copy smsd_checker, smsd_incoming and smsd_start to /usr/local/bin
# cd bin
# cp smsd* /usr/local/bin/
Note: assumed that you have installed gnokii on /usr/local, if you change it
to another path (/opt/gnokii maybe) copy them to /opt/gnokii/bin and dont forget to
edit SMSD_PATH to /opt/gnokii too in smsd_checker and smsd_incoming
9 . Enter /etc/init.d or /etc/rc.d/init.d and look for file rc.local, im sure you’ll
found it. Edit that file and put “/usr/local/bin/smsd_start” (without quotes) on the
bottom of the file (before exit if theres exit). This way smsd_start will be run
everytime the system startup
PlaySMS Web Interface:
1. It is important to meet all minimum requiments above (Its a must!)
2. Setup a system user named ‘playsms’ to manage PlaySMS
# adduser playsms
# passwd playsms
Note: on some Linux distributions adduser and passwd combined
3. On most Linux distributions actions (2) will create system user and group named playsms
with home directory /home/playsms, there you will install all PlaySMS files
4. Create public_html on user’s home directory, if its not already exists
# mkdir /home/playsms/public_html
5. Extract PlaySMS package somewhere (Place in /usr/local/src if you want to)
tar -zxvf playsms-x.x.x.tar.gz
6. Copy ‘web’ directory to public_html directory and set owner back to user playsms again
(for security reason)
# cp -rR web/* /home/playsms/public_html
# chown -R playsms /home/playsms/public_html
# chmod 701 /home/playsms
7. Setup database (import database)
# mysqladmin -u root -p create playsms
# mysql -u root -p playsms < /path_to_source_of_playsms/db/playsms.sql
Note: you dont need to use MySQL root access nor this method to setup PlaySMS
database, but this is beyond our scope, you should read MySQL manual for custom
installation method
8. Edit config.php on playsms web directory (/home/playsms/public_html/config.php)
Please read and fill all fields required carefully
9. Enter bin directory and copy playsmsd and playsmsd_start to /usr/local/bin
# cd bin
# cp playsmsd playsmsd_start /usr/local/bin/
10. Enter /etc/init.d or /etc/rc.d/init.d and look for file rc.local, im sure you’ll
found it. Edit that file and put “/usr/local/bin/playsmsd_start” (without quotes) on the
bottom of the file (before exit if theres exit). This way playsmsd_start will be run
everytime the system startup
11 Browse http://localhost/~playsms and login using default administrator user
username: admin
password: admin
12. At this point you should be able to logon PlaySMS webbased interface.
NOTES
—–
1. It is VERY important to set these settings below on your php.ini
safe_mode = Off
register_globals = Off
magic_quotes_gpc = On
2. Dont forget to read FAQ and CHANGELOG carefully




betting
Trackback by betting — March 25, 2006 @ 7:52 pm
Dear mas mau tanya seputar playsms dg gnokii sy mendapatkan error setelah melakukan semua procedure yg ada di faq berikut :
ini mas error yang terlihat :
1. setelah sy ketik http://localhost/~playsms yg keluar belum tampilan web php padahal apache nya udah jalan ( cek http://localhost…bisa), tapi tetapi cuma terlihat folder2 nya playsms secara vertikal dan ketika sy ketik salah satu folder muncul error sbb (Warning: Cannot modify header information - headers already sent by (output started at /home/playsms/public_html/sms/content.php:6) in /home/playsms/public_html/sms/init.php on line 9
Warning: main(/home/playsms/public_html/lib/dba.php): failed to open stream: No such file or directory in /home/playsms/public_html/sms/init.php on line 34
Warning: main(): Failed opening ‘/home/playsms/public_html/lib/dba.php’ for inclusion (include_path=’.:/usr/share/php:/usr/share/pear’) in /home/playsms/public_html/sms/init.php on line 34
Fatal error: Call to undefined function: dba_connect() in /home/playsms/public_html/sms/init.php on line 35 )
2.apakah waktu instalasi php harus seperti kayak gini mas ? pada waktu configure ? “./configure –with-apxs2=/usr/local/apache2/bin/apxs –with-mysql –enable-fastcgi –enable-cli ” ( sy contoh tulisan sms gateway dg modem itegno
3. tolong di info juga settingan untuk “httpd.conf” yah mas ..
thx sebelumnya
Comment by iwanhai — December 17, 2007 @ 5:12 am
i can’t connect gnoki with playsms. playsms is log on properly but when i send sms, its failed to send sms but in incoming sms shows sms is sent…gnokii is configured well and can send sms but CLI mode. i install gnokii by yum mean i don’t now where is file which i should tell to playsms to pick phone or use gnokii…. please do tell me where i should tell playsms to use gnokii…
Comment by adnan — July 25, 2008 @ 10:21 am
saya pernah buat aplikasi sms server serupa buat skripsi di ilmu komputer UGM. Judulnya “Pemanfaatan SMS untuk Pengaturan Komentar di Wordpress” pakai OpenSuse, modem ITegno USB, cakePHP.
Masalahnya sekarang modem iTegno nya dah tidak kepakai, jadi kalau ada teman-teman yang sedang cari modem itegno plus tutorialnya bisa hubungi saya. 085643077390
thanks buat Roni yang dah accept comment.
Comment by Ardian Yuli Setyanto — April 27, 2009 @ 1:45 pm
dah aku reply email nya, thanks ya. ternyata commentnya dah lambat banget. coz google ngajak kesini sih.
Comment by Ardian Yuli Setyanto — April 27, 2009 @ 4:12 pm
Mas Roni, kalo pake hp modemnya SMART bisa gak?
Pengen banget dech punya SMS server sendiri.
Tolong ya mas dijawab!
BTW bisa gak tutorial dari playSMSnya ditranslate ke basa Indonesia?
Ane kagak ngarti..
he he he…
Comment by Kang Rachmat — June 10, 2009 @ 4:36 am
ini kan copy paste doang….
Comment by kupret — July 12, 2009 @ 10:19 pm
# kupret : posting ini memang copy paste dari manual playSMS. Kan diawal tulisan sudah ditulis (”Diambil dari Manual PlaySMS”) ?
Comment by Salman — July 13, 2009 @ 12:51 am