From 03ff4cf236c4fd663206691c613b6c372a44b7fc Mon Sep 17 00:00:00 2001 From: Neil Lathwood Date: Tue, 22 Aug 2017 21:15:19 +0100 Subject: [PATCH] docs: Updated CentOS 7 + Nginx install docs (#7209) --- .../Installation-CentOS-7-Nginx.md | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/doc/Installation/Installation-CentOS-7-Nginx.md b/doc/Installation/Installation-CentOS-7-Nginx.md index 7a961aaedd..3909614821 100644 --- a/doc/Installation/Installation-CentOS-7-Nginx.md +++ b/doc/Installation/Installation-CentOS-7-Nginx.md @@ -20,7 +20,7 @@ FLUSH PRIVILEGES; exit ``` -`vim /etc/my.cnf` +`vi /etc/my.cnf` Within the [mysqld] section please add: @@ -63,6 +63,7 @@ Restart PHP. ```bash systemctl restart php-fpm +systemctl enable php-fpm ``` #### Add librenms user @@ -86,7 +87,7 @@ git clone https://github.com/librenms/librenms.git librenms cd /opt/librenms mkdir rrd logs chmod 775 rrd -vim /etc/nginx/conf.d/librenms.conf +vi /etc/nginx/conf.d/librenms.conf ``` Add the following config: @@ -120,6 +121,20 @@ server { } ``` +If LibreNMS will be your only vhost on this server then you will need to remove the default server block for nginx. + +Edit `/etc/nginx/nginx.conf` and look for a large block of text starting like: + +``` +server { + listen 80; + server_name localhost; +... +} +``` + +Remove this block of text. + #### SELinux ```bash @@ -158,7 +173,7 @@ Once you have completed the web installer steps. Please add the following to `co ```bash cp /opt/librenms/snmpd.conf.example /etc/snmp/snmpd.conf -vim /etc/snmp/snmpd.conf +vi /etc/snmp/snmpd.conf ``` Edit the text which says `RANDOMSTRINGGOESHERE` and set your own community string.