Install LAMP Stack ,The term LAMP is an acronym of the names of its 4 open-supply components:
- L – Linux operating device
- A – Apache, a HTTP and opposite proxy server
- M – MySQL or MariaDB relational database control device
- P – PHP programming language.
This collection of tutorials will take you thru how to set up a LAMP stack on Debian 9. We will display you a way to set up Apache, create Apache digital hosts, generate a free Let’s Encrypt SSL certificates, installation and comfy MySQL and installation PHP 7.2.
The unique tutorials which are a part of this collection are listed at the cease of this web page.
If you are in a hurry and don’t need to study greater precise documentation you can install LAMP Stack on your Debian nine server by means of following our Quickstart phase.
Install LAMP Stack on Debian nine [Quickstart]
This quickstart will display you the simple steps required to get a LAMP stack set up on an Debian 9 server.
Prerequisites
The person you’re logged in as must have sudo privileges as a way to install packages.
Step 1. Installing Apache
Installing Apache is a quite truthful system. Start through updating the packages index and install Apache with the following commands:
sudo apt replace
sudo apt deploy apache2
Step 2. Installing MariaDB
The next step is to put in the MariaDB packages. To achieve this kind:
sudo apt deploy mariadb-server
Once the installation is completed, problem the mysql_secure_installation command to enhance the security of the MariaDB set up:
sudo mysql_secure_installation
You may be asked to set the root password, take away the nameless person, restrict root consumer access to the neighborhood machine and take away the test database. You have to solution “Y” (yes) to all questions.
If you need to install MySQL in place of MariaDB, check our instructional for installation commands.
Step 3. Installing PHP
Debian nine ships with PHP version 7.0. To set up PHP and most commonplace PHP modules use the subsequent command:
sudo apt install personal home page libapache2-mod-php Hypertext Preprocessor-opcache php-cli php-gd Hypertext Preprocessor-curl Hypertext Preprocessor-mysql
Once the PHP packages are established restart the Apache carrier with:
sudo systemctl restart apache2
If you want to install PHP 7.2, refer to our guide for details.