How to Install LAMP (Linux, Apache, MariaDB, PHP 7) on Ubuntu

LAMP is a term that stands for Linux, Apache, MySQL and Perl/PHP/Phyton. It is a free software package used to run a complete application.

 

Components of LAMP :

  • Linux ▪ operating system
  • Apache HTTP Server ▪ web server
  • MariaDB or MySQL system database
  • PHP or Perl or Python ▪ programming language to use

 

Here's the easy way LAMP install at CentOS :

  • Login to your VPS/Server CentOS as ▪root or user who has permission to ejectinstall all Web Server requirements (For login can be used Putty on Windows or enter terminal in Linux)
  • If you've been on Terminal Linux CentOS, please do a yum function update first to smooth the process installation LAMP by typing the following commands:
sudo yum update

  • When finished with the update, it will display like this :

  • After updating the yum function completed, the next performs for menginstall Apache by typing the following command :
sudo yum install httpd

  • When you're done, run. Apache already terinstall by typing the following command :
sudo systemctl start httpd.service

  • After installation if you're done, you can check through the browser by typing your VPS IP address, for example if your VPS IP is 192.168.1.2, you can type http://192.168.1.2 on your browser


  • If successful it will display the view whatche default page on your browser as follows:


  • Next you do to menginstall MariaDB

MariaDB is a platform database Made by Developer MySQL. Since MySQL was acquired by the Oracle, the developers have moved on to platform. Database The new one that has more than MySQL. MariaDB is a development project created by MySQL developers, so all the commands and syntax mySQL are fully compatible with MariaDB.

  • To menginstall MariaDB on CentOS, please type the following command :
sudo yum install -y MariaDB-server MariaDB-client

  • If successful, it will display as follows:


*Pameter -y asked for an answer y (yes) in every question Yes / No.

  • Next, execute MariaDB by typing the following commands:
sudo systemctl start MariaDB

  • Then you can check MariaDB's status by typing the following commands:
sudo systemctl status MariaDB

  • If successful, it will display as follows:

  • Then to secure MySQL, You may type the following command :
sudo mysql_secure_installation

*At this process, type in Y for every question.

  • If successful, it will display as follows:

  • We're next in line.install PHP on CentOS using the following command :
sudo yum install php php-mysql

  • If successful, it will display as follows:

  • Furthermore, if the installation process is complete, then all you're doing is with merestart on Apache by typing the following command :
sudo systemctl restart httpd.service

  • You have installed it successfully LAMP on your VPS/Server CentOS, and by default your website is on directory /var/www/html
How to Add a Port for Plesk License Key Activation
How to Unblock International Access to a VPS