As we all know, LAMP is widely used in Web Hosting companies. LAMP is a collection of Linux, Apache, MySQL/MariaDB and PHP software. This article helps you to create LAMP environment on Debian 10 (Buster) Linux.
LAMP Stack comprises of the following software.
Linux : Operating System
Apache : Web Server
MySQL/MariaDB Database : RDBMS (Relational Database Management System)
PHP : Scripting / Programming used for web application development.
Prerequisites
1. Running Debian 10 Linux System.
2. Sudo access
3. Internet access to download packages
Step 1 – Update your system
$ sudo apt update
Step 2 – Installation of Apache Web Server
$ sudo apt install apache2 apache2-utils
Step 3 – Check Working of Apache
Now, it is time to check working of Apache Web Server, open web browser and type IP address of your system. It should Apache Web Server page as shown below.
If UFW Firewall is enable in your system, use below command to allow Apache2 Service Port 80.
$ sudo ufw allow http
$ sudo ufw status
ALSO READ : How to Start / Stop or Enable / Disable Firewall Service on Red Hat / CentOS and Debian / Ubuntu Linux
Step 4 – MySQL Installation
Follow MySQL Installation steps here.
Step 5 – PHP Installation
Install PHP, PHP Extension and Application Repository, Apache support and MySQL support.
$ sudo apt install php php-common php-mysql php-gd php-cli libapache2-mod-php
$ sudo echo “<?php phpinfo(); ?>” | sudo tee /var/www/html/phpinfo.php
Check Working of PHP
Once PHP is installed, create a sample info.php page in your document root directory (/var/www/html) and also restart Apache2 Service.
Open Web Browser and enter IP Address with info.php (192.168.56.116/info.php) in browser address bar as shown below.
Note: This may be vary on your setup.
READ ALSO: Debian GNU/Linux 10 Codename (Buster) Installation Guide
That’s it! In this article, we have seen LAMP Installation on Debian 10 Linux (Buster). Please share it with others and use comment box below to raise a query if any. Also Like us Our Facebook Official Page.