common_linux:phpipam
Различия
Показаны различия между двумя версиями страницы.
Следующая версия | Предыдущая версия | ||
common_linux:phpipam [2022/08/23 16:56] – создано root | common_linux:phpipam [2024/12/21 19:00] (текущий) – внешнее изменение 127.0.0.1 | ||
---|---|---|---|
Строка 2: | Строка 2: | ||
Клонирование кода phpIPAM из репозитория: | Клонирование кода phpIPAM из репозитория: | ||
<code bash> | <code bash> | ||
- | git clone --recursive https:// | + | git clone --recursive https:// |
- | cd / | + | cd /var/www/html/phpipam |
git checkout -b 1.5 origin/1.5 | git checkout -b 1.5 origin/1.5 | ||
</ | </ | ||
Строка 9: | Строка 9: | ||
Скопировать файл конфигурации config.dist.php в config.php | Скопировать файл конфигурации config.dist.php в config.php | ||
<code bash> | <code bash> | ||
- | cd / | + | cd /var/www/html/phpipam |
cp config.dist.php config.php | cp config.dist.php config.php | ||
</ | </ | ||
Строка 21: | Строка 21: | ||
$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 | mysql -u root -p | ||
Enter password: | Enter password: | ||
Строка 31: | Строка 117: | ||
MariaDB [(none)]> | MariaDB [(none)]> | ||
MariaDB [(none)]> | MariaDB [(none)]> | ||
+ | </ | ||
+ | Перенести на узел СУБД файл db/ | ||
+ | <code bash> | ||
+ | mysql -u root -p phpipam < db/ | ||
+ | </ |
common_linux/phpipam.1661262993.txt.gz · Последнее изменение: 2024/12/21 19:00 (внешнее изменение)