# Установка PHP

<figure><img src="/files/Tdpx4u3eAvXrkSlbq1F5" alt=""><figcaption></figcaption></figure>

## Добавление необходимых библиотек <a href="#dobavlenie-neobkhodimykh-bibliotek" id="dobavlenie-neobkhodimykh-bibliotek"></a>

Используйте команду

```
sudo apt-get -y install ca-certificates apt-transport-https
```

## Установка php: <a href="#ustanovka-php" id="ustanovka-php"></a>

Вам необходимо использовать две следующие команды:

```
wget -q https://packages.sury.org/php/apt.gpg -O- | apt-key add -
echo "deb https://packages.sury.org/php/ stretch main" | tee /etc/apt/sources.list.d/php.list
```

## Далее устанавливаем **php** и его основные модули:

```
sudo apt-get -y install php7.4 php7.4-{mcrypt,mysql,fpm}
```


---

# 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://wiki.qwins.co/veb-razrabotka/ustanovka-php.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.
