Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save UbuntuEvangelist/d23b87ce2e2fdd83acccadec2e3e070d to your computer and use it in GitHub Desktop.
Save UbuntuEvangelist/d23b87ce2e2fdd83acccadec2e3e070d to your computer and use it in GitHub Desktop.
Install playsms
To install playsms with nginx on Ubuntu Linux, you can follow these steps:
1. Update your Ubuntu system:
sudo apt update
sudo apt upgrade
2. Install the necessary packages:
sudo apt install nginx php-fpm php-mysql php-curl php-gd php-intl php-mbstring php-xml php-zip mariadb-server
3. Start the services:
sudo systemctl start nginx
sudo systemctl start php7.4-fpm
sudo systemctl start mariadb
4. Configure the database:
sudo mysql_secure_installation
sudo mysql -u root -p
CREATE DATABASE playsmsdb;
CREATE USER 'playadmin'@'localhost' IDENTIFIED BY 'PlyP@ssWord79';
GRANT ALL PRIVILEGES ON playsmsdb.* TO 'playadmin'@'localhost';
use playsmsdb;
FLUSH PRIVILEGES;
exit
5. Download and extract playsms:
cd /var/www/html/
sudo wget https://github.com/playsms/playsms/archive/master.zip
sudo unzip master.zip
sudo mv playsms-master playsms
sudo chown -R www-data:www-data playsms
cd /var/www/html/playsms
cp install.conf.dist install.conf
nano install.conf
#These are values I set on install.conf:
DBUSER="playadmin"
DBPASS="PlyP@ssWord79"
DBNAME="playsmsdb"
DBHOST="localhost"
DBPORT="3306"
WEBSERVERUSER="www-data"
WEBSERVERGROUP="www-data"
# Path to playSMS extracted source files
PATHSRC="/home/playsms/src/playSMS"
PATHWEB="/var/www/html/playsms"
PATHLIB="/var/lib/playsms"
PATHBIN="/usr/local/bin"
PATHLOG="/var/log/playsms"
PATHCONF="/etc"
#Run playSMS Install Script
cd /home/playsms/src/playSMS
./install-playsms.sh
#Adjust config.php
nano /var/www/html/playsms/config.php
#Inside config.php:
Search for logstate and set it to 3
Search for ishttps and set it to true
6. Create a new nginx configuration file:
sudo nano /etc/nginx/sites-available/playsms.conf
7. Paste the following configuration in the file and save it:
server {
listen 80;
server_name your_domain.com;
root /var/www/html/playsms;
index index.php;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
8. Enable the new configuration and restart nginx:
sudo ln -s /etc/nginx/sites-available/playsms.conf /etc/nginx/sites-enabled/
sudo systemctl restart nginx
9. Open the playsms web interface in your browser and complete the installation process:
http://your_domain.com/playsms/
That's it! You have now successfully installed playsms with nginx on Ubuntu Linux.
PS I love you. And i asked the Ask AI app to write this for me. Get it for free --> https://get-askai.app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment