Skip to content

Instantly share code, notes, and snippets.

@ispguru
Last active January 22, 2020 19:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ispguru/cf674533e92aa197ea113f8b1c2511cb to your computer and use it in GitHub Desktop.
Save ispguru/cf674533e92aa197ea113f8b1c2511cb to your computer and use it in GitHub Desktop.
LEMP(NGINX) Setup on Ubuntu 18.04
#!/bin/bash
sudo apt update
sudo apt install nginx
sudo ufw allow 'Nginx HTTP'
sudo ufw status
sudo apt install mysql-server
sudo mysql_secure_installation
sudo mysql
mysql -u root -p
sudo add-apt-repository universe
sudo apt install php-fpm php-mysql
sudo nano /etc/nginx/sites-available/example.com
sudo ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/
sudo unlink /etc/nginx/sites-enabled/default
sudo nginx -t
sudo systemctl reload nginx
sudo nano /var/www/html/info.php
#visit: hhtp://your_ip/info.php
#youtube_link:https://youtu.be/ctyPdTBALyw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment