I’ve just complete my first install on LibreNMS as I’ve heard so many good things about it. I’m just stuck on the time issue where my MYSQL database seems to be wrong, how do I fix this?
[root@localhost librenms]# ./validate.php
====================================
Component | Version
--------- | -------
LibreNMS | 1.54-5-g267e07e
DB Schema | 2019_07_03_132417_create_mpls_saps_table (139)
PHP | 7.2.19
MySQL | 5.5.60-MariaDB
RRDTool | 1.4.8
SNMP | NET-SNMP 5.7.2
====================================
[OK] Composer Version: 1.8.6
[OK] Dependencies up-to-date.
[OK] Database connection successful
[FAIL] Time between this server and the mysql database is off
Mysql time 2019-07-31 14:57:15
PHP time 2019-07-31 22:57:15
[OK] Database schema correct
[WARN] You have not added any devices yet.
[FIX]:
You can add a device in the webui or with ./addhost.php
[WARN] Your local git contains modified files, this could prevent automatic updates.
[FIX]:
You can fix this with ./scripts/github-remove
Modified Files:
bootstrap/cache/.gitignore
logs/.gitignore
rrd/.gitignore
storage/app/.gitignore
storage/app/public/.gitignore
storage/debugbar/.gitignore
storage/framework/cache/.gitignore
storage/framework/cache/data/.gitignore
storage/framework/sessions/.gitignore
storage/framework/testing/.gitignore
storage/framework/views/.gitignore
storage/logs/.gitignore
You should change your MySQL timezone to UTC, because I’ve heard that PHP7 having trouble with timezone that doesn’t support local time. I’ve experienced like this. PHP7 keep with UTC, while MySQL succeed changed into local time.
Configure PHP
Ensure date.timezone is set in php.ini to your preferred time zone. See http://php.net/manual/en/timezones.php for a list of supported timezones. Valid examples are: "America/New_York", "Australia/Brisbane", "Etc/UTC".