# Установка Битрикс на LX контейнер ProxMox

{% embed url="<https://www.youtube.com/watch?v=Sp34z9hPPvg>" %}

Подключиться к LXC контейнеру на Proxmox:

```
pct enter ID_контейнера
```

Обновить все пакеты и установить дополнительные для работы

```
yum update
yum install wget
yum install nano
yum install mc
yum install net-tools

// настройка дати
date
\cp /usr/share/zoneinfo/Europe/Kyiv /etc/localtime
yum install chrony
systemctl enable chronyd
systemctl start chronyd
```

### Установка fail2ban

{% embed url="<https://www.digitalocean.com/community/tutorials/how-to-protect-ssh-with-fail2ban-on-centos-7>" %}

```
sudo yum install epel-release
yum install fail2ban
sudo systemctl enable fail2ban
sudo systemctl restart fail2ban
sudo fail2ban-client status
```

### Установка Zabbix agent2

{% embed url="<https://www.zabbix.com/ru/download?zabbix=6.4&os_distribution=centos&os_version=7&components=agent_2&db=&ws=>" %}

```
nano /etc/zabbix/zabbix_agent2.conf
```

### Работа с сервером

```
shutdown -h now
reboot
```

### Установка 1С-Битрикс: Веб-окружение

{% embed url="<https://dev.1c-bitrix.ru/learning/course/index.php?COURSE_ID=37&LESSON_ID=8811>" %}

```
wget https://repo.bitrix.info/yum/bitrix-env.sh
chmod +x bitrix-env.sh
./bitrix-env.sh
```

{% hint style="info" %}
Зайти в Виртуальную машину, сменить пароли при первой авторизации через консоль ProxMox и установить пароль для пользователя bitrix
{% endhint %}

Посмотреть параметры подключения к БД

```
nano /root/.my.cnf
```

Войти в панель управления BitrixEnv

```
/root/menu.sh
```

Добавить полные права на файл добавления сайтов

```
chmod 777 /root/bitrix-env/add_site.sh
```

Добавление нового сайта:

```
/root/bitrix-env/add_site.sh
```

Создать резервную копию папки/файла

```
tar czf /home/bitrix/ext_www/corp_new.tar.gz --absolute-names /home/bitrix/ext_www/corp.ciab.expert/
```

Обновить сертифікати ЛетсЕнскріпт

```
yum install ca-certificates
update-ca-trust
```

Проверить работу сертификатов сайта можно тут: <https://www.sslshopper.com/>


---

# 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://vsydorenko.gitbook.io/sysadminisnotes/proxmox/ustanovka-bitriks-na-lx-konteiner-proxmox.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.
