NOTE: These instructions assume you are the root user. If you are not, prepend `sudo` to all shell commands (the ones that aren't at `mysql>` prompts) or temporarily become a user with root privileges with `sudo -s`.
This host is where the MySQL database runs. It could be the same machine as your network management server (this is the most common initial deployment scenario).
> ** Whilst we are working on ensuring LibreNMS is compatible with MySQL strict mode, for now, please disable this after mysql is installed.
Replace `<ip>` above with the IP of the server running LibreNMS. If your database is on the same server as LibreNMS, use `localhost` as the IP address.
If you are deploying a separate database server, you also need to specify the `bind-address`. If your MySQL database resides on the same server as LibreNMS, you should skip this step.
Install necessary software. The packages listed below are an all-inclusive list of packages that were necessary on a clean install of CentOS 6.4 or 7. It also requires the EPEL repository. Net_IPv6 is required even if your network environment does not support IPv6.
Edit `/etc/snmp/snmpd.conf` to enable self-polling. An absolute minimal config for snmpd is:
rocommunity public 127.0.0.1
You may either edit the default configuration file to your liking, or backup the default config file and replace it entirely with your own. To apply your changes, run `service snmpd restart` for Centos 6, or `systemctl restart snmpd` for Centos 7 (w/ systemd). If you have deployed a separate database server, you will likely want to configure snmpd on that host as well.
In `/etc/php.ini`, ensure `date.timezone` is set to your preferred time zone. See http://php.net/manual/en/timezones.php for a list of supported timezones. Valid
Please also ensure that `allow_url_fopen` is enabled. Other functions needed for LibreNMS include `exec,passthru,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,popen`.
If the file `/etc/httpd/conf.d/welcome.conf` exists, you will want to remove that as well unless you're familiar with [Name-based Virtual Hosts](https://httpd.apache.org/docs/2.2/vhosts/name-based.html).
You can clone the repository via HTTPS or SSH. In either case, you need to ensure the appropriate port (443 for HTTPS, 22 for SSH) is open in the outbound direction for your server.
NOTE: The recommended method of cloning a git repository is HTTPS. If you would like to clone via SSH instead, use the command `git clone git@github.com:librenms/librenms.git librenms` instead.
At this stage you can launch the web installer by going to `http://IP/install.php` and follow the on-screen instructions. Alternatively if you want to continue the setup manually then perform the manual install steps. If you cannot reach the installer, stop here and solve that problem before proceeding. Afterwards, Add the following line to the end of `config.php`:
Change the values to the right of the equal sign for lines beginning with `$config[db_]` to match your database information as previously configured.
Change the value of `$config['snmp']['community']` from `public` to whatever your default read-only SNMP community is. If you have multiple existing communities in your environment, set it to the most common.
Add the following line to the end of `config.php`:
Important: Be sure you have no characters (including whitespace like: newlines, spaces, tabs, etc) outside of the `<?php?>` blocks. Your graphs will break otherwise and there will be no error messages to indicate otherwise!
Replace `public` to match what you set in `/etc/snmp/snmpd.conf`. This command also assumes you are using SNMP v2c. If you're using v3, there are additional steps (NOTE: instructions for SNMPv3 to come).
The polling method used by LibreNMS is `poller-wrapper.py`, which was placed in the public domain by its author. By default, the LibreNMS cronjob runs `poller-wrapper.py` with 16 threads. The current LibreNMS recommendation is to use 4 threads per core. The default if no thread count is `16 threads`.
LibreNMS performs daily updates by default. At 00:15 system time every day, a `git pull --no-edit --quiet` is performed. You can override this default by editing
your `config.php` file. Remove the comment (the `#` mark) on the line:
That's it! You now should be able to log in to http://librenms.example.com/. Please note that we have not covered HTTPS setup in this example, so your LibreNMS install is not secure by default. Please do not expose it to the public Internet unless you have configured HTTPS and taken appropriate web server hardening steps.
It would be great if you would consider opting into the stats system we have, please see [this page](http://docs.librenms.org/General/Callback-Stats-and-Privacy/) on what it is and how to enable it.