I try to install LibreNMS for the first time.
I’ve tried it in my debian webserver, and i get an error when I come to http://mydomain.com/install.php
And when I try install it to a Debian 9 from scratch, I get the sames error :
Parse error : syntax error, unexpected ‘?’, expecting variable (T_VARIABLE) in /opt/librenms/vendor/zendframework/zend-diactoros/src/functions/marshal_uri_from_sapi.php on line 83
PHP 7.2 not available to the original repository Debian stretch (9.9.0), so i’ve added this one : deb https://packages.sury.org/php/ $(lsb_release -sc) main
And I’ve been activate php7.2 to apache ( a2enmod php7.2 && systemctl restart apache2)
As well I’ve replaced su - librenms by sudo -i -u librenms
I’ve tried with php7.3 --> Sames error
Result from./validate.php
PHP Fatal error: Uncaught Error: Call to undefined function LibreNMS\Util\app() in /opt/librenms/LibreNMS/Util/Laravel.php:71
Stack trace: #0 /opt/librenms/LibreNMS/DB/Eloquent.php(111): LibreNMS\Util\Laravel::isBooted() #1 /opt/librenms/LibreNMS/DB/Eloquent.php(92): LibreNMS\DB\Eloquent::DB() #2 /opt/librenms/LibreNMS/Util/Version.php(58): LibreNMS\DB\Eloquent::isConnected() #3 /opt/librenms/includes/common.php(1160): LibreNMS\Util\Version->database() #4 /opt/librenms/validate.php(72): version_info() #5 [internal function]: {closure}() #6 {main}
thrown in /opt/librenms/LibreNMS/Util/Laravel.php on line 71
[FAIL] config.php does not exist, please copy config.php.default to config.php
And if I try to create a config.php with my mysql database information, I’ve a blank page when I try to access to my LibreNMS WUI.
$marshalIpv6HostAndPort = function (array $server, string $host, ?int $port) : array {
$host = '[' . $server['SERVER_ADDR'] . ']';
$port = $port ?: 80;
if ($port . ']' === substr($host, strrpos($host, ':') + 1)) {
// The last digit of the IPv6-Address has been taken as port
// Unset the port so the default port can be used
$port = null;
}
return [$host, $port];
};
In fact, i’ve stopped installation LibreNMS.
When I tried to Ubuntu 18.04 and Apache, installation page appears, but I use a special character to mySQL password (@), and installation script LibreNMS doesn’t work with this.
So, I work with Zabbix
Zabbix may be more complex to this configuration but I think more functionality.