I have a fresh install of CentOS 7 (Core). I followed the instructions at https://docs.librenms.org/Installation/Installation-CentOS-7-Apache/ to configure LibreNMS, however, after going through the initial WebUI setup, I can’t login due to logs not being writeable…
The message text is:
### Running the following commands will fix the issue most of the time:
### Cannot write to log file: "/opt/librenms/logs/librenms.log"
Make sure it exists and is writable, or change your LOG_DIR setting.
#### If using SELinux you may also need:
semanage fcontext -a -t httpd_sys_rw_content_t '/opt/librenms/logs/librenms.log(/.*)?'
restorecon -RFv /opt/librenms/logs/librenms.log
I am not sure how to resolve this - the log file exists. An ls -li for the log folder shows the following:
total 4 34109138 -rwxrwxr--. 1 librenms librenms 801 Mar 20 13:50 librenms.log
I tried to run the commands, but semanage wasn’t found… I haven’t changed any settings. The only part of the tutorial I missed was the “Configure snmpd” bit, as snmpd.conf didn’t contain “RANDOMSTRINGGOESHERE”.
Running validate.php produces the following output:
[OK] Composer Version: 1.8.4
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
[WARN] You have not added any devices yet.
You can add a device in the webui or with ./addhost.php
[WARN] Your install is over 24 hours out of date, last update: Fri, 01 Mar 2019 00:00:01 +0000
Make sure your daily.sh cron is running and run ./daily.sh by hand to see if there are any errors.
Warning 1: Correct, I haven’t added any devices
Warning 2: Not sure what this is or the cron job that isn’t running? (I ran the command to create the job as per the instructions); but it’s not showing up as a fail - is this alright to leave? If not, how would I resolve this.