Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
linux:monitoring:zabbix:install [2019/11/06 12:34]
jlucas [Zabbix frontend system prep]
linux:monitoring:zabbix:install [2019/11/06 12:43] (current)
jlucas
Line 166: Line 166:
   doas make install   doas make install
  
-====Zabbix frontend system prep====+====Zabbix frontend from packages====
  
-===Install Apache and PHP===+Install package(s) 
 + 
 +  doas pkg_add zabbix-web-4.0.11p0 
 + 
 +Update the **//zabbix.conf.php//** with the following 
 + 
 +  $DB['TYPE'                    = 'POSTGRESQL'; 
 +  $DB['PASSWORD'                = '<YOUR_PASSWORD>'; 
 + 
 +====Install PHP-FPM & enable httpd==== 
 + 
 +===Install PHP===
  
   doas pkg_add php-7.3.10 php-pgsql-7.3.10 php-gd-7.3.10 php-ldap-7.3.10   doas pkg_add php-7.3.10 php-pgsql-7.3.10 php-gd-7.3.10 php-ldap-7.3.10
  
-Enable the PgSQL entension for PHP+Enable PHP extension
  
   doas ln -sf /etc/php-7.3.sample/pgsql.ini /etc/php-7.3/   doas ln -sf /etc/php-7.3.sample/pgsql.ini /etc/php-7.3/
Line 194: Line 205:
      
   types {   types {
-  include "/usr/share/misc/mime.types"+    include "/usr/share/misc/mime.types"
   }   }
-   +  server "HOSTNAME" { 
-  server "default" { +    listen on * tls port 443 
-   listen on * port 80 +    tls { 
-   +      certificate "/etc/ssl/HOSTNAME.pem" 
-   root "/htdocs+      key "/etc/ssl/private/HOSTNAME.key" 
-   directory index index.php +    } 
-   +    root "/zabbix
-   location "*.php*"+    directory index index.php } 
-   fastcgi socket "/run/php-fpm.sock" +    # Increase connection limits to extend the lifetime 
-   }+    connection { max requests 500, timeout 3600 } 
 +    connection { max request body 8388608 } 
 +    location "/conf/*"
 +      block return 401 
 +    } 
 +    location "*.php*"
 +      fastcgi socket "/run/php-fpm.sock" 
 +    } 
 +    location "/.well-known/acme-challenge/*"
 +      root "/acme" 
 +      request strip 2 
 +    }
   }   }
  
Line 216: Line 238:
  
 If you want to have a TLS secured connection, follow these instructions [[https://www.romanzolotarev.com/openbsd/acme-client.html|here]]. If you want to have a TLS secured connection, follow these instructions [[https://www.romanzolotarev.com/openbsd/acme-client.html|here]].
-====Zabbix frontend from packages==== 
- 
-Install package(s) 
- 
-  doas pkg_add zabbix-web-4.0.11p0 
- 
-Update the **//zabbix.conf.php//** with the following 
- 
-  $DB['TYPE'                    = 'POSTGRESQL'; 
-  $DB['PASSWORD'                = '<YOUR_PASSWORD>'; 
  
 ====Zabbix frontend from source==== ====Zabbix frontend from source====