How to Install LEMP on Ubuntu

Install LEMP on Ubuntu

LEMP is an opensource software known as acronym which is used to serve a dynamic web page and applications.  This term really focus on Nginx framework and lot more faster than the Apache.

Therefore, for installing Lemp on Ubuntu, follow the below steps :

Step 1: Update the system

2: Install Nginx  on your system

3: Now, try to start your Nginx

4: Check out it’s status

5:Install MariaDB Database Server

After installing mariadb server, you have to follow below step.

6: Start enable MariaDB Database Server

7: Run below command to make secure MariaDB server

8: Log into mariadb server

After you are successfully logged in,  you we be in mariadb server and you can easily change your root id and password.

9: Install PHP-FPM

After installing php, hence you have to run the below command

You have to know that, its version 7.2, so you have to write 7.2 on configuration settings.

Therefore, You have to edit it and have to insert the  below command:

Now, save it and close the file.

Step 10: Restart nginx

Hence, you have to create phphinfo.php file in nginx root directory and edit it.

edit it with below command:

Save the below file and now open the Nginx configuration file.

Then uncomment php block:

therefore, save the file and exit it.


Hence, go to the browser and open  URL:

Now, php test page will appear, that means you have successfully installed LEMP in Ubuntu.



Leave a Reply

Your email address will not be published. Required fields are marked *