To install a LAMP (Linux, Apache, MySQL, PHP) stack on Debian 10 (Buster), you can use the following steps:
Install Apache:sudo apt update
sudo apt install apache2
This installs the Apache web server.
Install MySQL:sudo apt install mysql-server
This installs the MySQL database server and prompts you to set a root password for the MySQL server.
Install PHP:sudo apt install php libapache2-mod-php
This installs PHP and the Apache PHP module, which allows Apache to process PHP scripts.
Restart Apache to enable the PHP module:sudo systemctl restart apache2
You can verify the installation by creating a PHP script in the default Apache document root (usually /var/www/html
) and accessing it through a web browser. For example, create a file called info.php
with the following content:
<?php phpinfo(); ?>Souecr:www.lautturi.com
Then, open http://localhost/info.php
in a web browser, and you should see the PHP information page.
LAMP is a software stack that includes Apache, MySQL, and PHP, which are commonly used for building dynamic web sites and web applications. With a LAMP stack, you can host a website or web application that stores and retrieves data from a MySQL database using PHP scripts.
Note: These steps assume that you are using Debian 10 (Buster) and the
apt
package manager. If you are using a different Linux distribution or a different package manager, you may need to use different commands to install the LAMP stack.