./validate.php
====================================
Component | Version
--------- | -------
LibreNMS | 1.70.1
DB Schema | 2020_11_02_164331_add_powerstate_enum_to_vminfo (191)
PHP | 7.4.13
Python | 3.6.8
MySQL | 5.5.68-MariaDB
RRDTool | 1.4.8
SNMP | NET-SNMP 5.7.2
OpenSSL |
====================================
[OK] Composer Version: 2.0.7
[OK] Dependencies up-to-date.
[OK] Database connection successful
[FAIL] Time between this server and the mysql database is off
Mysql time 2020-12-03 17:17:14
PHP time 2020-12-03 18:17:14
[FAIL] MySQL Database collation is wrong: latin1 latin1_swedish_ci
[FIX]:
Check https://t.libren.ms/-zdwk for info on how to fix.
[OK] Database schema correct
[FAIL] You have no timezone set for php.
[FIX]:
http://php.net/manual/en/datetime.configuration.php#ini.date.timezone
Here is the permissions for librenms.log:
ll /opt/librenms/logs/
total 3186696
-rw-rw-r--. 1 librenms librenms 2198529 Dec 3 16:23 daily.log
-rw-rw-r--. 1 librenms librenms 0 Jun 2 2020 discovery_wrapper.log
-rw-rw-r--. 1 librenms librenms 3259143613 Dec 3 17:17 librenms.log
-rw-rw-r--. 1 librenms librenms 0 Jun 2 2020 poller_wrapper.log
-rw-rw-r--. 1 librenms librenms 0 Jun 2 2020 services_wrapper.log
on file /etc/php-fpm.d/www.conf I changed user and group from apache to librenms and I get to the login page.
sudo less /etc/php-fpm.d/www.conf
; Start a new pool named âwwwâ.
; the variable $pool can be used in any directive and will be replaced by the
; pool name (âwwwâ here)
[www]
; Per pool prefix
; It only applies on the following directives:
; - âaccess.logâ
; - âslowlogâ
; - âlistenâ (unixsocket)
; - âchrootâ
; - âchdirâ
; - âphp_valuesâ
; - âphp_admin_valuesâ
; When not set, the global prefix (or @php_fpm_prefix@) applies instead.
; Note: This directive can also be relative to the global prefix.
; Default Value: none
;prefix = /path/to/pools/$pool
; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default userâs group
; will be used.
; RPM: apache user chosen to provide access to the same directories as httpd
;user = apache
user = librenms
; RPM: Keep a group allowed to write in log dir.
;group = apache
group = librenms
Now the error is LDAP related:
PHP LDAP support missing
PHP does not support LDAP, please install or enable the PHP LDAP extension
OK, installed php-ldap (is missing from the copy+paste guide), restart the services (well not actually, I reboot the damn thing) and we are back monitoring!
on file /etc/php-fpm.d/www.conf change user and group from apache to librenms
Example:
sudo less /etc/php-fpm.d/www.conf
; Start a new pool named âwwwâ.
; the variable $pool can be used in any directive and will be replaced by the
; pool name (âwwwâ here)
[www]
; Per pool prefix
; It only applies on the following directives:
; - âaccess.logâ
; - âslowlogâ
; - âlistenâ (unixsocket)
; - âchrootâ
; - âchdirâ
; - âphp_valuesâ
; - âphp_admin_valuesâ
; When not set, the global prefix (or @php_fpm_prefix@) applies instead.
; Note: This directive can also be relative to the global prefix.
; Default Value: none
;prefix = /path/to/pools/$pool
; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default userâs group
; will be used.
; RPM: apache user chosen to provide access to the same directories as httpd
;user = apache
user = librenms
; RPM: Keep a group allowed to write in log dir.
;group = apache
group = librenms
Careful with changing php-fpm to run as librenms if you have more than one website on this server.
The new install docs have you create a custom fpm config on a specific socket for LibreNMS running as the user. When using www, it is likely to be shared with other sites, so it should not run as librenms. Check the current install docs to see.
Following this guide: https://www.tecmint.com/install-php-7-in-centos-7/, disabling the webtatic repo, and then doing a yum update on my Librenms VM allowed me to get the new version of PHP.
I then had the bad gateway error, but enabling and then starting php-fpm seems to have fixed the problem