common_linux:phpipam
Различия
Показаны различия между двумя версиями страницы.
Предыдущая версия справа и слеваПредыдущая версияСледующая версия | Предыдущая версия | ||
common_linux:phpipam [2022/08/31 17:28] – удалено - внешнее изменение (Unknown date) 127.0.0.1 | common_linux:phpipam [2024/12/21 19:00] (текущий) – внешнее изменение 127.0.0.1 | ||
---|---|---|---|
Строка 1: | Строка 1: | ||
+ | ====== Установка phpIPAM ====== | ||
+ | Клонирование кода phpIPAM из репозитория: | ||
+ | <code bash> | ||
+ | git clone --recursive https:// | ||
+ | cd / | ||
+ | git checkout -b 1.5 origin/1.5 | ||
+ | </ | ||
+ | Скопировать файл конфигурации config.dist.php в config.php | ||
+ | <code bash> | ||
+ | cd / | ||
+ | cp config.dist.php config.php | ||
+ | </ | ||
+ | Отредактировать параметры секции отвечающей за подключение к СУБД в config.php: | ||
+ | <code ini> | ||
+ | * database connection details | ||
+ | | ||
+ | $db[' | ||
+ | $db[' | ||
+ | $db[' | ||
+ | $db[' | ||
+ | $db[' | ||
+ | </ | ||
+ | |||
+ | Настроить модули Apache2: | ||
+ | <code bash> | ||
+ | a2dissite 000-default.conf | ||
+ | a2enmod rewrite | ||
+ | systemctl restart apache2 | ||
+ | </ | ||
+ | Если используется версия PHP7.4++, то в нем отключен модуль PEAR. Его необходимо установить вручную: | ||
+ | <code bash> | ||
+ | wget http:// | ||
+ | / | ||
+ | </ | ||
+ | Отвечаем на вопросы: | ||
+ | <code bash> | ||
+ | Below is a suggested file layout for your new PEAR installation. | ||
+ | change individual locations, type the number in front of the | ||
+ | directory. | ||
+ | accept these locations. | ||
+ | |||
+ | 1. Installation base ($prefix) | ||
+ | 2. Temporary directory for processing | ||
+ | 3. Temporary directory for downloads | ||
+ | 4. Binaries directory | ||
+ | 5. PHP code directory ($php_dir) | ||
+ | 6. Documentation directory | ||
+ | 7. Data directory | ||
+ | 8. User-modifiable configuration files directory : /usr/cfg | ||
+ | 9. Public Web Files directory | ||
+ | 10. System manual pages directory | ||
+ | 11. Tests directory | ||
+ | 12. Name of configuration file : / | ||
+ | |||
+ | 1-12, ' | ||
+ | Beginning install... | ||
+ | Configuration written to / | ||
+ | Initialized registry... | ||
+ | Preparing to install... | ||
+ | WARNING! | ||
+ | contain the PEAR PHP directory you just specified: | ||
+ | </ | ||
+ | If the specified directory is also not in the include_path used by | ||
+ | your scripts, you will have problems getting any PEAR packages working. | ||
+ | |||
+ | |||
+ | Would you like to alter php.ini </ | ||
+ | |||
+ | php.ini </ | ||
+ | |||
+ | Current include path : .:/ | ||
+ | Configured directory | ||
+ | Currently used php.ini (guess) : / | ||
+ | </ | ||
+ | Прописываем в файл / | ||
+ | <code ini> | ||
+ | ; UNIX: "/ | ||
+ | include_path = " | ||
+ | </ | ||
+ | |||
+ | Создать конфигурационный файл **/ | ||
+ | <code xml | phpipam.conf> | ||
+ | < | ||
+ | ServerAdmin admin@virtlab.local | ||
+ | DocumentRoot "/ | ||
+ | ServerName ipam.virtlab.local | ||
+ | ServerAlias ipam | ||
+ | < | ||
+ | Options Indexes FollowSymLinks | ||
+ | AllowOverride All | ||
+ | Require all granted | ||
+ | </ | ||
+ | ErrorLog "/ | ||
+ | CustomLog "/ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Выдать разрешения на каталог: | ||
+ | <code bash> | ||
+ | chown -R www-data: | ||
+ | </ | ||
+ | |||
+ | Включить сайт и перезагрузить службу: | ||
+ | <code bash> | ||
+ | a2ensite phpipam | ||
+ | systemctl restart apache2 | ||
+ | </ | ||
+ | |||
+ | На узле с СУБД создать базу и пользователя: | ||
+ | <code bash> | ||
+ | mysql -u root -p | ||
+ | Enter password: | ||
+ | Welcome to the MariaDB monitor. | ||
+ | |||
+ | MariaDB [(none)]> | ||
+ | MariaDB [(none)]> | ||
+ | MariaDB [(none)]> | ||
+ | </ | ||
+ | |||
+ | Перенести на узел СУБД файл db/ | ||
+ | <code bash> | ||
+ | mysql -u root -p phpipam < db/ | ||
+ | </ |