How to Install LAMP (Linux Apache Mariadb Php7) in Ubuntu 16


Lamp (Linux, Apache, MySQL, PHP) is a term commonly used for the installation of Apache + MySQL + PHP on a Linux Server. As the development of software, MySQL has now been replaced with MariaDB so that the term LAMP becomes Linux Apache PHP MariaDB. In this tutorial, we assume that you already have Linux Ubuntu server at 16 on your PC or on your VPS.


Step 1: Install Apache Web Server 2. installation of Apache webserver can be done via the apt-get command as below:

sudo apt-get install -y apache2

y-parameters indicate answer y (yes) in each question Yes/No after installation is complete, you can check through the browser by typing in the http:// VPS-IP.

Step 2: Install MariaDB. MariaDB the database platform is created by the Developer of MySQL. Since the acquisition by Oracle on MySQL, the Developer then switch to make a new Database Platform has many advantages compared to MySQL.

MariaDB is an advanced Project because that is created by the developer of MySQL, then all the commands and syntax is fully compatible with mySQL, MariaDB.

How to Install MariaDB simply by typing the following Command Line in terminal:

sudo apt-get install -y mariadb-server mariadb-client

After installation is complete, run the MariaDB by typing the following command:

sudo service mysql start

Then, check the status of the mariaDB by typing:

sudo service mysql status

then, for the MySQL security, type the following command:

sudo mysql_secure_installation

Step 3: Install PHP7. to install PHP, can be done by using the following command line:

sudo apt-get install -y php

You can check the version of PHP installed with the command:

php -v

After the installation process is complete, restart Apache with the following command:

sudo service apache2 restart





This site uses Akismet to reduce spam. Learn how your comment data is processed.