Monday, June 07, 2021

[net/librenms]: pkg/README inconsistencies

Hello,

While deploying net/librenms, I noticed the pkg/README seems to be broken
regarding the database creation. On my side, I got:

Option 1: CLI
-------------
cd /var/www/librenms
$EDITOR config.php # set database username/password etc.
doas -u _librenms ./build-base.php
doas: ./build-base.php: command not found

ls -l build-base.php adduser.php addhost.php discovery.php poller.php
ls: build-base.php: No such file or directory
-rwxr-xr-x 1 root bin 8766 Apr 19 20:46 addhost.php
-rwxr-xr-x 1 root bin 956 Apr 19 20:46 adduser.php
-rwxr-xr-x 1 root bin 4627 Apr 19 20:46 discovery.php
-rwxr-xr-x 1 root bin 5974 Apr 19 20:47 poller.php



build-base.php is no more. According to CVS, it has been removed here:
https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/net/librenms/pkg/PLIST.diff?r1=1.73&r2=1.74&f=h

So I loaded /var/www/librenms/database/schema/mysql-schema.dump into the
database. It seems ok but I have to add this SQL command to have a working DB:
"ALTER DATABASE librenms CHARACTER SET utf8 COLLATE utf8_unicode_ci;"
(from https://community.librenms.org/t/post-db-collation-characterset-update-fixes/696)


Another side note, I had specify the full path to those binaries to pass
the "./validate.php" check:
$ grep local /var/www/librenms/config.php
$config['fping'] = '/usr/local/sbin/fping';
$config['rrdtool'] = '/usr/local/bin/rrdtool';
$config['snmpgetnext'] = '/usr/local/bin/snmpgetnext';


I can propose an update for the pkg/README file if it's the right way to
proceed with the installation. What do you think ?

Thanks,
Best.

--
Olivier Cherrier
Phone: +352691570680
mailto:oc@symacx.com

No comments:

Post a Comment