WriteBash - In this article, I will give you a script that will help you install the LEMP stack on Debian 8 quickly. How to use script to install LEMP on Debian 8? With just a few simple steps in this article, you will do just that.
About this script
I wrote this script to help you install the LEMP stack on Debian 8 easily and quickly. Helps you avoid typing too many complex commands while easily mistaking.
This script will automatically install the following packages:
- Nginx 1.13.10
- MariaDB 10.2.13
- PHP 7.0.28-1~dotdeb+8.1
The script will automatically allow PHP-FPM to work with Nginx, and set up a vhost demo file that will allow access to the phpinfo file.
In order to use this script, your server must meet the following requirements:
- OS: Debian 8.x, i use Debian 8.10 (Jessie) 64 bit
- CPU: at least 1 vCPU
- RAM: over 1 GB memory
- HDD: 5 GB free space
- User: root
- IP: set static IP, ex: 192.168.56.30
Use script to install LEMP on Debian 8
Now I will go through the steps of using scripts to install LEMP on Debian 8.
First, you run the following command to load the script from my public repository.
wget https://gitlab.com/Danny_Pham/WriteBash.com/raw/master/Install/07-Script_install_LEMP_PHP_7.0_on_Debian_8.sh -O /home/install.sh
Next, you grant permission for the script.
chmod 700 /home/install.sh
And finally, you execute the script to install the LEMP stack.
During the installation process, at the MariaDB server installation step, it will display a window asking you to enter the root password for the database server.
You need to wait 10-15 minutes for the script to finish installing the LEMP stack, it depends on the speed of your internet connection.
Check the operation of LEMP
After the script completes the installation, you can begin to test the operation of the LEMP stack. First, you visit the info.php page to see if PHP-FPM works well with Nginx.
Next, run the commands below to check whether the services of the LEMP stack are working.
To check service Nginx.
systemctl status nginx
To check service MariaDB server.
systemctl status mysql
And to check service PHP-FPM.
systemctl status php7.0-fpm
If you want to check version of LEMP stack, you can type the following commands.
To check Nginx version.
To check MariaDB version, note that uppercase V.
And to check PHP version.
As you can see, with just three commands you can now install the LEMP stack on Debian 8. It’s easy, do not make mistakes and fast. What are you waiting for, use it to save your time. Now your only thing is to start adding the website source and set up vhost.If you liked this article, then please subscribe to our YouTube Channel for more video tutorials. You can also find us on Twitter and Facebook.
If you appreciate what we share in this blog, you can support us by:
- Stay connected to: Facebook | Twitter | Google Plus | YouTube
- Subscribe email to recieve new posts from us: Sign up now.
- Start your own blog with SSD VPS - Free Let's Encrypt SSL ($2.5/month).
- Become a Supporter - Make a contribution via PayPal.
- Support us by purchasing Ribbon Lite Child theme being using on this website.
We are thankful for your support.