playSMS is an open-source SMS management software that allows you to send and receive SMS messages using various gateways and protocols, which is an excellent tool for businesses, organizations, or anyone who wants to manage SMS communication efficiently.
In this article, we will guide you through the installation of playSMS on a Linux server, which will cover the requirements, installation steps, and configuration processes to help you get started.
Table of Contents
System Requirements
Before installing playSMS, ensure that your system meets the following requirements:
- A Linux distribution (Ubuntu, Debian, RHEL, etc).
- A web server (Apache or Nginx).
- PHP (version 7.0 or higher).
- MySQL or MariaDB.
- An internet connection.
Step 1: Installing Apache, PHP and MySQL
First, update your package manager to ensure you have the latest software available.
sudo apt update [Ubuntu/Debian] sudo dnf update [RHEL]
Once system packages are updated, you can install Apache, PHP, and MySQL with the following command on Ubuntu-based distributions.
sudo apt install apache2 php libapache2-mod-php php-mysql sudo apt install php-curl php-gd php-mbstring php-xml php-zip sudo apt install mysql-server
On RHEL-based distributions, you can use:
sudo yum install httpd php php-mysqlnd sudo yum install epel-release sudo yum install php-curl php-gd php-mbstring php-xml php-zip sudo yum install mariadb-server
Once Apache, PHP, and MySQL are installed, you can start and enable them to start on boot:
---------------- On Ubuntu/Debian ---------------- sudo systemctl start apache2 sudo systemctl enable apache2 sudo systemctl start mysql sudo systemctl enable mysql
---------------- On RHEL/Fedora ---------------- sudo systemctl start httpd sudo systemctl enable httpd sudo systemctl start mariadb sudo systemctl enable mariadb
Next, you need to secure the database installation by running the security script to set a root password and secure your installation:
sudo mysql_secure_installation
Step 2: Installing and Configuring playSMS Portal
Before installing and configuring the playSMS portal, you need to create a database and a user for playSMS.
mysql -u root -p CREATE DATABASE playsms; CREATE USER 'playsmsuser'@'localhost' IDENTIFIED BY 'your_password'; GRANT ALL PRIVILEGES ON playsms.* TO 'playsmsuser'@'localhost'; FLUSH PRIVILEGES; EXIT;
Replace your_password
with a secure password.
Next, create a source directory where you will download and install playSMS.
mkdir -p /home/tecmint/src cd /home/tecmint/src
Now visit the playSMS GitHub page and download the latest version of the software using wget command, make sure to replace x.x.x
with the latest version number:
wget https://github.com/playsms/playsms/archive/refs/tags/1.4.7.tar.gz
Once downloaded, extract the playSMS package.
tar -xvf 1.4.7.tar.gz
Navigate to the playSMS directory and copy the example configuration file to a new file and edit it.
cd /home/tecmint/src/playsms-1.4.7/ cp install.conf.dist install.conf vi install.conf
In install.conf
, you’ll need to customize settings such as database connection details and other configurations to suit your system.
With your configurations set, run the installation script:
sudo ./install-playsms.sh
To ensure that playSMS runs automatically at startup and if it goes down, you need to set up a cron job.
crontab -e
Insert the following line to run the playSMS daemon every minute.
* * * * * /home/tecmint/bin/playsmsd /home/tecmint/etc/playsmsd.conf start
After installation, check if the playSMS daemon is running:
ps ax | grep playsms
You can run additional checks to confirm the installation:
/home/tecmint/bin/playsmsd /home/tecmint/etc/playsmsd.conf status /home/tecmint/bin/playsmsd /home/tecmint/etc/playsmsd.conf check
If everything seems correct, you can access playSMS through your web browser:
URL:http://[your web server IP]
Default Admin Username:admin
Default Admin Password:admin
Follow the on-screen instructions to complete the setup process. You will need to configure the SMS gateway you plan to use for sending and receiving messages.
Conclusion
By following these steps, you should have successfully installed playSMS on your Linux system. If you have any issues or further questions, feel free to ask for help or consult the playSMS community for assistance.