# Installing LAMP

## What is a LAMP in Linux?

LAMP stands for **Linux, Apache, MySQL, and PHP**. Together, they provide a proven set of software for delivering high-performance web applications. Each component contributes essential capabilities to the stack: Linux: The operating system.

## Installing a LAMP on Ubuntu 21.04

First of all. Make sure you are using an user with permissions so that you can use commands such as 'apt-get' etc.

{% hint style="info" %}
1 - Installing Apache WebServer
{% endhint %}

> root\@petrosky:/# apt install apache2

![](/files/zBGkZFmKYjV7GSRaFVwb)

{% hint style="info" %}
2 - Installing MariaDB
{% endhint %}

> root\@petrosky:/# apt install mariadb\*

![](/files/fx7ejM7yU05zIsRLgSu3)

{% hint style="info" %}
3 - Configuring the MariaDB database
{% endhint %}

> root\@petrosky:/# mysql\_secure\_installation
>
> You will be prompted whether to set a password or not. We highly recommend setting up a password for the 'root' DB User and disabling Remote SQL Connections.

{% hint style="info" %}
4 - Installing PHP
{% endhint %}

> root\@petrosky:/# apt install php libapache2-mod-php

![](/files/0iAqcSQ9JXuwPWpU9RL3)

Yet we are done! Now we have our LAMP Installed!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.petrosky.io/getting-started/tutorials/installing-lamp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
