Skip to main content

How to install and configure a LAMP stack on your Linux VPS

Sabrina Goom avatar
Written by Sabrina Goom
Updated over a month ago

To get started with a simple LAMP stack on your VPS, do the following:

(for Ubuntu/Debian/CentOS):

Run sudo apt install apache2 mysql-server php php-mysql (Ubuntu/Debian) or yum install httpd mariadb-server php php-mysql (CentOS).

Then start services with systemctl start commands and secure MySQL by using the mysql_secure_installation command.

Finally place your files in /var/www/html.

Did this answer your question?