LibreNMS is already installed in an incus container on your “srv1” virtual amchine. It runs under a different virtual hostname, so you can reach it on the following URL:

- http://librenms-campusY.ws.nsrc.org/

# Reference: Installing LibreNMS at home

To install LibreNMS in your own network, then you should follow the instructions in the documentation site.

There are three options:

- Install from source. Make sure you don’t deploy on any OS other than the versions they show, as you may find problems with incompatible version of PHP and other dependencies. For this reason it is a good idea to run LibreNMS inside its own VM or container.
- Run the docker image using `docker compose`.
- Run the pre-built VM image under a hypervisor such as libvirt/kvm or virtualbox. The image is only updated intermittently, so check the release date, but you should be able to run an update within the VM.

# Tuning LibreNMS

There are some tuning steps to improve the performance of LibreNMS. These have already been done in the lab.

## Use rrdcached

rrdcached allows LibreNMS to write information about devices to memory instead of directly to disk. LibreNMS is a resource-intensive tool and adding memory cache support to LibreNMS will lessen the load on your server.

See https://docs.librenms.org/Extensions/RRDCached/.

## Tuning Mysql / MariaDB

The following settings can go in `/etc/mysql/mariadb.conf.d/99-librenms.cnf` to override defaults:

    [mysqld]
    innodb_file_per_table=1
    lower_case_table_names=0
    innodb_flush_log_at_trx_commit = 2

Some systems and/or older versions of LibreNMS may also require `sql-mode=""`.

See:

- https://docs.librenms.org/Installation/Install-LibreNMS/#configure-mariadb
- https://docs.librenms.org/Support/Performance/#mysql-optimisation
- https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_flush_log_at_trx_commit