Instalare si configurare PlaySMS

PlaySMS is a free and open source SMS software. A flexible Web-based Mobile Portal System that it can be made to fit to various services such as an SMS gateway, bulk SMS, personal messaging systems, corporate and group communication tools.

Pentru a putea funcționa va trebuie și un SMS Gateway, eu am folosit smstools


Creăm user:

 

adduser playsms

Adding user `playsms’ …
Adding new group `playsms’ (1002) …
Adding new user `playsms’ (1002) with group `playsms’ …
Creating home directory `/home/playsms’ …
Copying files from `/etc/skel’ …
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for playsms
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] y

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

luam ultima versiune de la http://sourceforge.net/projects/playsms/ sau link direct de la https://sourceforge.net/projects/playsms/files/latest/download și o extragem

cd /tmp
download-ati ultima versiune
sudo tar -zxvf playsms-1.4.2.tar.gz -C /usr/local/src
ls -l /usr/local/src/
cd /usr/local/src/playsms-1.4.2/
cp -rR * /var/www/trimitesms 
chown -R www-data /var/www/trimitesms

Creăm baza de date și o populăm:

mysqladmin -u root -p create playsms
mysql -u root -p playsms < db/playsms.sql

Configurăm (și punem datele de autentificare la mysql):

cd /var/www/trimitesms/web
 cp config-dist.php config.php
 vi config.php

<?php
// PHP PEAR DB compatible database engine:
// mysql, mysqli, pgsql, odbc and others supported by PHP PEAR DB
$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’] = ‘parola’; // database password
$core_config[‘db’][‘name’] = ‘playsms’; // database name

// 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
// —————————————————————–

Acum pornim programul:

mkdir -p /etc/default /usr/local/bin /var/log/playsms /var/lib/playsms
chown -R www-data /var/www/trimitesms /var/log/playsms /var/lib/playsms
cd /var/www/trimitesms
sudo cp daemon/linux/etc/playsmsd.conf /etc/playsmsd.conf
sudo cp daemon/linux/bin/playsmsd.php /usr/local/bin/playsmsd
sudo chmod +x /usr/local/bin/playsmsd

Verificăm să fie PATH corect:

vi /etc/playsms

Instalăm scriptul de pornire la boot:

cp /usr/local/src/playsms-1.4.2/daemon/linux/etc/init.d/playsms /etc/init.d/playsms
 update-rc.d playsms defaults

update-rc.d: using dependency based boot sequencing

Pornim programul și verificăm dacă și rulează:

/etc/init.d/playsms start

Starting playsms daemon: playsmsd.
Starting recvsms daemon: recvsmsd.
Starting sendsms daemon: sendsmsd.
Starting dlrssms daemon: dlrssmsd.

ps axf | grep playsms

8434 pts/2    S+     0:00          \_ grep playsms
8179 ?        S      0:00 /bin/bash /usr/local/bin/_playsms/playsmsd /var/www/playsms
8187 ?        S      0:00 /bin/bash /usr/local/bin/_playsms/recvsmsd /var/www/playsms
8195 ?        S      0:00 /bin/bash /usr/local/bin/_playsms/sendsmsd /var/www/playsms
8204 ?        S      0:00 /bin/bash /usr/local/bin/_playsms/dlrssmsd /var/www/playsms

– acum deschidem pagina și ne autentificăm:

http://<web server IP>/playsms/

username: admin
password: admin

 

PlaySMS

PlaySMS

 

Pentru a modifica prima pagină editați:

vi /var/www/playsms/plugin/themes/common/templates/page_welcome.html

 

 

 


Ultimele stiri:

    No feed items found.

 

 

 

 

 

 

 

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Zi cu cuvintele tale...