{"id":250,"date":"2022-04-17T21:49:31","date_gmt":"2022-04-17T19:49:31","guid":{"rendered":"https:\/\/schoppe.it\/wiki\/?p=250"},"modified":"2024-09-03T08:51:16","modified_gmt":"2024-09-03T06:51:16","slug":"zabbix-server-installieren","status":"publish","type":"post","link":"https:\/\/schoppe.it\/wiki\/zabbix-server-installieren\/","title":{"rendered":"Zabbix Server installieren"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Einleitung<\/h2>\n\n\n\n<p>Der Leitfaden gilt f\u00fcr <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Zabbix Version 6.2<\/li><li>Debian 11 bullseye<\/li><li>Datenbank PostgreSQL<\/li><li>Webserver Apache<\/li><li>Let&#8217;s Encrypt Zertifikat via Certbot<\/li><\/ul>\n\n\n\n<p>Alle Original-Leitf\u00e4den (auch f\u00fcr alternative Setups) findet Ihr unter <a href=\"https:\/\/www.zabbix.com\/download\">https:\/\/www.zabbix.com\/download<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. Systemanforderungen pr\u00fcfen<\/h2>\n\n\n\n<p><a href=\"https:\/\/www.zabbix.com\/documentation\/current\/en\/manual\/installation\/requirements\">https:\/\/www.zabbix.com\/documentation\/current\/en\/manual\/installation\/requirements<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. Linux Debian Server installieren<\/h2>\n\n\n\n<p>Linux Server mit Debian vorbereiten bspw. bei <a rel=\"noreferrer noopener\" href=\"https:\/\/hetzner.cloud\/?ref=GRbszpZkwb3M\" target=\"_blank\">Hetzner<\/a>. Und Firewall konfigurieren. Die folgenden Ports sollten f\u00fcr eingehenden Verkehr ge\u00f6ffnet werden:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Port 22 TCP SSH<\/li><li>Port 80 und 443 TCP HTTP\/HTTPS<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">3. Vorbereitungen<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n--optional Linux Kernel Version und Distribution anzeigen\nuname -a\nlsb_release -a\n\napt update\napt upgrade\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">4. Zabbix installieren<\/h2>\n\n\n\n<p>Tipp: Schaut unter <a href=\"https:\/\/www.zabbix.com\/download\">https:\/\/www.zabbix.com\/download<\/a> nach welche die aktuellste Version ist und \u00fcbernimmt von dort die ersten Schritte.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nwget https:\/\/repo.zabbix.com\/zabbix\/6.2\/debian\/pool\/main\/z\/zabbix-release\/zabbix-release_6.2-1+debian11_all.deb\ndpkg -i zabbix-release_6.2-1+debian11_all.deb\napt update\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\napt install zabbix-server-pgsql zabbix-frontend-php php7.4-pgsql zabbix-apache-conf zabbix-sql-scripts zabbix-agent\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">5. PostgreSQL Server installieren<\/h2>\n\n\n\n<p>Die in folgendem Beitrag beschriebenen Schritte auf demselben Host oder einem separaten Datenbankserver ausf\u00fchren.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-wiki-schoppe-it wp-block-embed-wiki-schoppe-it\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"VXLL3TmL82\"><a href=\"https:\/\/schoppe.it\/wiki\/postgres-datenbank-server-installieren\/\">Postgres Datenbank Server installieren<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8222;Postgres Datenbank Server installieren&#8220; &#8212; wiki.schoppe.it\" src=\"https:\/\/schoppe.it\/wiki\/postgres-datenbank-server-installieren\/embed\/#?secret=9KrSuqjTdv#?secret=VXLL3TmL82\" data-secret=\"VXLL3TmL82\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">6. Zabbix Datenbank und Datenbankuser erstellen<\/h2>\n\n\n\n<p>Auf dem <strong>Datenbankserver (!) <\/strong>ausf\u00fchren:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo -u postgres createuser --pwprompt zabbix\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"684\" height=\"237\" src=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/createuser.png\" alt=\"\" class=\"wp-image-316\" srcset=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/createuser.png 684w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/createuser-300x104.png 300w\" sizes=\"auto, (max-width: 684px) 100vw, 684px\" \/><figcaption>Abfrage \\du in postgresql nach createuser<\/figcaption><\/figure>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo -u postgres createdb -O zabbix zabbix\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"698\" height=\"277\" src=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/createdb.png\" alt=\"\" class=\"wp-image-312\" srcset=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/createdb.png 698w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/createdb-300x119.png 300w\" sizes=\"auto, (max-width: 698px) 100vw, 698px\" \/><figcaption>Abfrage \\l in postgresql nach createdb<\/figcaption><\/figure>\n\n\n\n<p>Und initiale Daten auf dem <strong>Datenbankserver <\/strong>importieren:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nzcat \/usr\/share\/doc\/zabbix-sql-scripts\/postgresql\/server.sql.gz | sudo -u zabbix psql zabbix\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">7. Zabbix konfigurieren und installieren<\/h2>\n\n\n\n<p>Datenbankpasswort eintragen:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nnano \/etc\/zabbix\/zabbix_server.conf\n<\/pre><\/div>\n\n\n<p>Der Parameter <strong>DBPassword <\/strong>in Line 129 ist standardm\u00e4\u00dfig auskommentiert. Hier das zuvor vergebene Datenbankpasswort eintragen.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"973\" height=\"580\" src=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/dbpassword.png\" alt=\"\" class=\"wp-image-289\" srcset=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/dbpassword.png 973w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/dbpassword-300x179.png 300w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/dbpassword-768x458.png 768w\" sizes=\"auto, (max-width: 973px) 100vw, 973px\" \/><figcaption>DBPasswort<\/figcaption><\/figure>\n\n\n\n<p>Restart und enable Zabbix Server:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsystemctl restart zabbix-server zabbix-agent apache2\nsystemctl enable zabbix-server zabbix-agent apache2\n<\/pre><\/div>\n\n\n<p>Zabbix Setup kann nun bereits \u00fcber <strong>http:\/\/IP-Adresse-des-Servers\/zabbix<\/strong> bzw. <strong>http:\/\/deine.domain.de\/zabbix<\/strong> gestartet werden. <\/p>\n\n\n\n<p>Wir installieren aber in den folgenden beiden Schritten noch ein Let&#8217;s Encrypt Zertifikat und \u00e4ndern das Apache-Root-Verzeichnis.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">8. HTTPS mit Let&#8217;s Encrypt via Certbot<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo apt install certbot python3-certbot-apache\nsudo certbot --apache\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"682\" height=\"352\" src=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/certbot-1-1.png\" alt=\"\" class=\"wp-image-336\" srcset=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/certbot-1-1.png 682w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/certbot-1-1-300x155.png 300w\" sizes=\"auto, (max-width: 682px) 100vw, 682px\" \/><figcaption>Erstmalige Registrierung mit Angabe der E-Mail-Adresse und ToS<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"741\" height=\"589\" src=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/certbot-2-1.png\" alt=\"\" class=\"wp-image-337\" srcset=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/certbot-2-1.png 741w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/certbot-2-1-300x238.png 300w\" sizes=\"auto, (max-width: 741px) 100vw, 741px\" \/><figcaption>Ausstellen des Zertifikats<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">9. Apache Root-Verzeichnis anpassen<\/h2>\n\n\n\n<p>Damit Zabbix direkt \u00fcber <strong>https:\/\/deine.domain.de<\/strong> aufgerufen werden, kann man das Apache Root-Verzeichnis anpassen.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nnano \/etc\/apache2\/sites-available\/000-default-le-ssl.conf\n<\/pre><\/div>\n\n\n<p>Das Zabbix-Webverzeichnis liegt unter \/usr\/share\/zabbix.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"840\" height=\"646\" src=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/apache-root-1.png\" alt=\"\" class=\"wp-image-339\" srcset=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/apache-root-1.png 840w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/apache-root-1-300x231.png 300w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/apache-root-1-768x591.png 768w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" \/><\/figure>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo service apache2 restart\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">10. Zabbix Web-Setup<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"871\" height=\"551\" src=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/zabbix-setup.png\" alt=\"\" class=\"wp-image-290\" srcset=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/zabbix-setup.png 871w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/zabbix-setup-300x190.png 300w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/zabbix-setup-768x486.png 768w\" sizes=\"auto, (max-width: 871px) 100vw, 871px\" \/><\/figure>\n\n\n\n<p>Im ersten Schritt werden noch einmal die System Requirements angezeigt.<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/zabbix_requierments_1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"861\" height=\"552\" data-id=\"298\" src=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/zabbix_requierments_1.png\" alt=\"\" class=\"wp-image-298\" srcset=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/zabbix_requierments_1.png 861w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/zabbix_requierments_1-300x192.png 300w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/zabbix_requierments_1-768x492.png 768w\" sizes=\"auto, (max-width: 861px) 100vw, 861px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/zabbix_requierments_2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"860\" height=\"517\" data-id=\"299\" src=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/zabbix_requierments_2.png\" alt=\"\" class=\"wp-image-299\" srcset=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/zabbix_requierments_2.png 860w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/zabbix_requierments_2-300x180.png 300w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/zabbix_requierments_2-768x462.png 768w\" sizes=\"auto, (max-width: 860px) 100vw, 860px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/zabbix_requierments_3.png\"><img loading=\"lazy\" decoding=\"async\" width=\"859\" height=\"514\" data-id=\"300\" src=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/zabbix_requierments_3.png\" alt=\"\" class=\"wp-image-300\" srcset=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/zabbix_requierments_3.png 859w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/zabbix_requierments_3-300x180.png 300w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/zabbix_requierments_3-768x460.png 768w\" sizes=\"auto, (max-width: 859px) 100vw, 859px\" \/><\/a><\/figure>\n<\/figure>\n\n\n\n<p>Weitere Infos und Schritte unter: <a href=\"https:\/\/www.zabbix.com\/documentation\/5.4\/en\/manual\/installation\/frontend\">https:\/\/www.zabbix.com\/documentation\/5.4\/en\/manual\/installation\/frontend<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"862\" height=\"540\" src=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/congrats.png\" alt=\"\" class=\"wp-image-326\" srcset=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/congrats.png 862w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/congrats-300x188.png 300w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2022\/04\/congrats-768x481.png 768w\" sizes=\"auto, (max-width: 862px) 100vw, 862px\" \/><figcaption>Installation abgeschlossen (im Darkmode)<\/figcaption><\/figure>\n\n\n\n<p>Beim ersten Zabbix Login den Username <strong>Admin <\/strong>und das Passwort <strong>zabbix <\/strong>nutzen.<\/p>\n\n\n\n<p>Weitere Infos und Schritte unter: <a href=\"https:\/\/www.zabbix.com\/documentation\/5.4\/en\/manual\/quickstart\/login\">https:\/\/www.zabbix.com\/documentation\/5.4\/en\/manual\/quickstart\/login<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Einleitung Der Leitfaden gilt f\u00fcr Zabbix Version 6.2 Debian 11 bullseye Datenbank PostgreSQL Webserver Apache Let&#8217;s Encrypt Zertifikat via Certbot Alle Original-Leitf\u00e4den (auch f\u00fcr alternative Setups) findet Ihr unter https:\/\/www.zabbix.com\/download 1. Systemanforderungen pr\u00fcfen https:\/\/www.zabbix.com\/documentation\/current\/en\/manual\/installation\/requirements 2. Linux Debian Server installieren Linux Server mit Debian vorbereiten bspw. bei Hetzner. Und Firewall konfigurieren. Die folgenden Ports sollten f\u00fcr&hellip; <a class=\"more-link\" href=\"https:\/\/schoppe.it\/wiki\/zabbix-server-installieren\/\"><span class=\"screen-reader-text\">Zabbix Server installieren<\/span> weiterlesen<\/a><\/p>\n","protected":false},"author":1,"featured_media":326,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[118],"tags":[122,125,105,126,109,106],"powershell":[],"wordpress":[],"exchange":[],"linux":[111,104,127,124,121,123,93],"class_list":["post-250","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-apache","tag-certbot","tag-debian","tag-lets-encrypt","tag-postgresql","tag-zabbix","linux-apt-update","linux-apt-upgrade","linux-certbot-apache","linux-lsb_release-a","linux-nano","linux-uname-a","linux-wget","entry"],"_links":{"self":[{"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/posts\/250","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/comments?post=250"}],"version-history":[{"count":40,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/posts\/250\/revisions"}],"predecessor-version":[{"id":435,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/posts\/250\/revisions\/435"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/media\/326"}],"wp:attachment":[{"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/media?parent=250"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/categories?post=250"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/tags?post=250"},{"taxonomy":"powershell","embeddable":true,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/powershell?post=250"},{"taxonomy":"wordpress","embeddable":true,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/wordpress?post=250"},{"taxonomy":"exchange","embeddable":true,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/exchange?post=250"},{"taxonomy":"linux","embeddable":true,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/linux?post=250"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}