Script to install LEMP on Debian 8

by Daniel Pham
Published: Updated:

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.

Server requirements

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.

bash /home/install.sh

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.

Script to install LEMP on Debian 8
Set root’s password for 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.

Script to install LEMP on Debian 8
Access info.php page to make sure 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
Script to install LEMP on Debian 8
Check version of LEMP stack.

If you want to check version of LEMP stack, you can type the following commands.

To check Nginx version.

nginx -v

To check MariaDB version, note that uppercase V.

mysql -V

And to check PHP version.

php -v

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.

(This is an article from my old blog that has been inactive for a long time, I don’t want to throw it away so I will keep it and hope it helps someone).

0 0 votes
Article Rating

You may also like

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

DevOps Lite is a personal blog specializing in technology with main topics about DevOps, DevSecOps, SRE and System Administrator. Articles are shared for free and contributed to the community.

SUPPORT US

FOLLOW US

Subscribe my Newsletter for new blog posts. Stay updated from your inbox!

© 2021-2024 DevOpsLite.com – All rights reserved.

Please write sources “DevOpsLite.com” when using articles from this website.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

2
0
Would love your thoughts, please comment.x
()
x

Adblock Detected

Please support us by disabling your AdBlocker extension from your browsers for our website.