View Single Post
  #1  
Old 29th July 2010, 17:04
letsharehowto letsharehowto is offline
Junior Member
 
Join Date: Dec 2009
Location: Sai gon - Viet Nam
Posts: 12
Thanks: 0
Thanked 12 Times in 8 Posts
Default SMS Gateway Ubuntu server 9.10 Playsms Smstools3.

Today I will tell you howto setup box which run SMS Gateway with Ubuntu server 9.10, playsms and smstools3.

My box: Intel P4
My cell phone: picture

Create new box with Ubuntu server 9.10. If you don't know, you can google

Softwares install: only choose SSH

Install finished ->Reboot->Logon then active root account, code:

sudo passwd root

Logout then login with root and we later we do everything with root too.
Upgrade box, code:

apt-get update
apt-get upgrade -y

Install some software, code:

apt-get install -y apache2 mysql-server php5 php5-cli php5-cgi php-pear php-db phpmyadmin make gcc sendmail lynx

When box ask password, I choose 111111 for all
Add playsms user, code:

adduser playsms

Then, code:

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
wget http://sourceforge.net/projects/play...ar.gz/download

Unzip, code:

tar -zxvf playsms-0.9.4.tar.gz -C /usr/local/src
cd /usr/local/src/playsms-0.9.4/web
cp -rR * /var/www/playsms
chown -R www-data /var/www/playsms
mysqladmin -u root -p create playsms

When box ask password, type: 111111
Code:

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

When box ask password, type: 111111
Code:

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

Please find rootpassword (on line 8) and replace with 111111. Save and exit.
Code:

cd /usr/local/src/playsms-0.9.4/bin
cp playsmsd playsmsd.php playsmsd_start /usr/local/bin/
cp playsms /etc/default/
nano /etc/init.d/rc.local

Add:
/usr/local/bin/playsmsd_start
on the bottom of the file (before exit if theres exit command). This way playsmsd_start will start automatically on boot. Save and exit.

Get static for NIC, code:

nano /etc/network/interfaces

Delete all and replace with:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.66
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

Edit /etc/resolv.conf, code:

nano /etc/resolv.conf

Delete all and replace with:

nameserver 192.168.1.1

Reboot, code:

reboot

Login with root, download file, code:

wget http://smstools3.kekekasvi.com/packa...3-3.1.3.tar.gz

Unzip, code:

tar -zxvf smstools3-3.1.3.tar.gz -C /usr/local/src
cd /usr/local/src/smstools3
make

Code:

make install

Code:

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

Please find ttyUSB0 (on line 27) and replace with ttyACM0. Save and exit.

Code:

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
reboot

Browse http://localhost/playsms/ and login using default administrator user
username: admin
password: admin

click Gateway, click Manage smstools, click (click here to active)

Reboot box, code:

reboot

Enjoy

Thanks:

http://www.howtoforge.com
http://www.ubuntu.com
http://playsms.sourceforge.net
http://smstools3.kekekasvi.com

More picture at: http://picasaweb.google.com/116366725840175897341
Attached Images
     
Reply With Quote
Sponsored Links