# Настройка прокси (если используется) и репозитория

{% hint style="warning" %}
Примечание: данный способ настройки прокси может быть применён только для HOSTVM версии 4.3, для HOSTVM 4.4 при наличии прокси необходимо использовать образ с поддержкой установки в offline-режиме.
{% endhint %}

Если в данной сети доступ во вне доступен только через прокси, то следует выполнить следующие настройки:

1. В файле /etc/yum.conf, для загрузки пакетов через прокси добавляем строки

```
proxy=http://proxyhost:8080
proxy_username=proxyname
proxy_password=proxypass
```

2. Экспортировать глобальные переменные прокси для работы CURL

```
## http прокси с именем и паролем 
export http_proxy=http://user:password@your-proxy-ip-address:port/
## HTTPS версия ##
export https_proxy=https://your-ip-address:port/
export https_proxy=https://user:password@your-proxy-ip-address:port/
```

На примере, сначала устанавливаем переменные для прокси и затем используем CURL

```
export http_proxy=http://foo:bar@1.1.1.1:3128/
export https_proxy=$http_proxy
## Use curl command ##
curl -I www.system-admins.ru
```

Если на этапе установки возникала проблема с postinstall скриптом, то необходимо выполнить скрипт `initial.sh`

```
[root@virt2 ~]# sh initial.sh
```

По итогу выполнения скрипта, в директории /root/ будет создан лог-файл `initial_log_текущая-дата.log`


---

# 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://kb.pvhostvm.ru/hostvm-server/installation-guide/ustanovka-hostvm-4.3-4.4/pered-ustanovkoi-hostvm-manager/nastroika-proksi-esli-ispolzuetsya-i-repozitoriya.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.
