| 161 | |
| 162 | restart nginx and php |
| 163 | |
| 164 | `rm /etc/nginx/sites-enabled/default` |
| 165 | |
| 166 | `systemctl restart nginx` |
| 167 | |
| 168 | `systemctl restart php7.4-fpm` |
| 169 | |
| 170 | |
| 171 | == Enable lnms command completion == |
| 172 | |
| 173 | `ln -s /opt/librenms/lnms /usr/bin/lnms` |
| 174 | |
| 175 | `cp /opt/librenms/misc/lnms-completion.bash /etc/bash_completion.d/` |
| 176 | |
| 177 | |
| 178 | === Configure snmpd ==== |
| 179 | |
| 180 | `cp /opt/librenms/snmpd.conf.example /etc/snmp/snmpd.conf` |
| 181 | |
| 182 | `vi /etc/snmp/snmpd.conf` |
| 183 | |
| 184 | RANDOMSTRINGGOESHERE and set your own community string |
| 185 | |
| 186 | `curl -o /usr/bin/distro https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/distro` |
| 187 | |
| 188 | `chmod +x /usr/bin/distro` |
| 189 | |
| 190 | `systemctl enable snmpd` |
| 191 | |
| 192 | `systemctl restart snmpd` |
| 193 | |
| 194 | |
| 195 | === Cron job ==== |
| 196 | |
| 197 | `cp /opt/librenms/librenms.nonroot.cron /etc/cron.d/librenms` |
| 198 | |
| 199 | === Copy logrotate config ==== |
| 200 | |
| 201 | LibreNMS keeps logs in /opt/librenms/logs. Over time these can become large and be rotated out. To rotate out the old logs you can use the provided logrotate config file: |
| 202 | |
| 203 | `cp /opt/librenms/misc/librenms.logrotate /etc/logrotate.d/librenms` |
| 204 | |
| 205 | === Web installer === |
| 206 | |
| 207 | `chown librenms:librenms /opt/librenms/config.php` |
| 208 | |
| 209 | |
| 210 | === Troubleshooting === |
| 211 | |
| 212 | `sudo su - librenms` |
| 213 | |
| 214 | `./validate.php` |
| 215 | |
| 216 | |
| 217 | |