This guide will demonstrate how to install LAMP stack with MariaDB 10 on Debian 10 Buster. LAMP stack is a representation of web services attacks and it stands for; the Linux OS, Apache HTTP Server, MySQL/MariaDB relational database management system (RDBMS), and the PHP programming language. They can all be bundled together on a server for running web services.
Install LAMP Stack with MariaDB 10 on Debian 10 Buster
Perform System Update
To begin with, update and upgrade your system packages, which is the Linux OS component of the stuck. In this case, it is your Debian 10 Buster.
apt update
apt upgrade
Install Apache Web server
Once the system update is done, proceed to install Apache, the web server. Apache is available on the default Debian 10 Buster repos and can be installed by running the command below;
apt install apache2
Running Apache Web server
Once the installation is done, Apache is set to run by default. Check the status.
systemctl status apache2
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor pre
Active: active (running) since Wed 2019-06-19 15:56:54 EDT; 1min 37s ago
Docs: https://httpd.apache.org/docs/2.4/
Main PID: 1205 (apache2)
Tasks: 55 (limit: 2359)
Memory: 9.0M
CGroup: /system.slice/apache2.service
├─1205 /usr/sbin/apache2 -k start
├─1207 /usr/sbin/apache2 -k start
└─1208 /usr/sbin/apache2 -k start
It is also set to run on system boot by default.
systemctl is-enabled apache2
enabled
You can verify that Apache is ready to serve web requests by navigating the web browser and entering the server address as http://<server-IP>. You should be welcomed by Apache2 Deabian Test page.
Note that if UFW is running, you need to Allow Apache through it.
ufw allow in “WWW Full”
Install MySQL/MariaDB on Debian 10 Buster
In this guide, we are using MariaDB 10.4. See how to install MariaDB 10.4 on Debian 10 Buster by following the link below;
Install MariaDB 10 on Debian 10 Buster
Install PHP 7.3 on Debian 10 Buster
PHP 7.3 is available on the default Debian 10 Buster repos. Hence, execute the command below to install PHP and PHP Apache and MySQL/MariaDB extensions.
apt install php libapache2-mod-php php-mysql
Test PHP Processing
To test PHP processing, create a PHP test page under the Apache web root directory, usually, /var/www/html, with the following content.
vim /var/www/html/test.php
<?php phpinfo();
To test PHP processing, navigate to the browser and enter the address;
http://<server-IP>/test.php
Once you have confirmed that all is well, remove the PHP test page.
rm -rf /var/www/html/test.php
Well, that is all on how to install LAMP Stack with MariaDB 10 on Debian 10 Buster.
Related Tutorials;
Install LAMP Stack on Fedora 30
Install LAMP Stack on Debian 9
How To Install LAMP (Linux, Apache, MySQL, PHP) Stack on Fedora 28/29
How to Install LAMP Stack (Apache,MariaDB, PHP 7.2) on Ubuntu 18.04 LTS