{"id":6286,"date":"2021-11-14T15:51:36","date_gmt":"2021-11-14T15:51:36","guid":{"rendered":"https:\/\/www.geekdecoder.com\/?p=6286"},"modified":"2021-11-14T15:51:36","modified_gmt":"2021-11-14T15:51:36","slug":"install-zabbix-agent-on-debian-10","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2021\/11\/14\/install-zabbix-agent-on-debian-10\/","title":{"rendered":"Install Zabbix Agent2 Version 5.4 on Debian 10\/11"},"content":{"rendered":"<p>Get the package for Debian 10 Buster:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nwget https:\/\/repo.zabbix.com\/zabbix\/5.4\/debian\/pool\/main\/z\/zabbix-release\/zabbix-release_5.4-1%2Bdebian10_all.deb\n<\/pre>\n<p>Install the repo for Debian 10 Buster<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\ndpkg -i zabbix-release_5.4-1+debian10_all.deb\n<\/pre>\n<p>Get the package for Debian 11 Bulleye<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nwget https:\/\/repo.zabbix.com\/zabbix\/5.4\/debian\/pool\/main\/z\/zabbix-release\/zabbix-release_5.4-1%2Bdebian11_all.deb\n<\/pre>\n<p>Install the repo for Debian 11 Bullseye<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\ndpkg -i zabbix-release_5.4-1+debian11_all.deb\n<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\napt update\napt full-upgrade\n<\/pre>\n<p>For Agent 2<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\napt install zabbix-agent2\n<\/pre>\n<p>We now need to edit the configuration file to tell the agent where to find the server. Open \/etc\/zabbix\/zabbix_agent2.conf in your preferred text editor and make the following changes to tell the agent which Zabbix servers are allowed to talk to it:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nnano \/etc\/zabbix\/zabbix_agent2.conf\nServer=&#x5B;IP or hostname of your Zabbix server]\nServerActive=&#x5B;IP or hostname of your Zabbix server]\n<\/pre>\n<p>We also need to tell Zabbix the hostname of the system. This doesn\u2019t have to be the actual hostname, it is the display name we will use within Zabbix for the system. Comment out the default value of Hostname=Zabbix server and replace it with the following:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nHostnameItem=system.hostname\n<\/pre>\n<p>This will tell the agent to automatically populate the hostname value with the system hostname. You could just set the hostname within the configuration file. However, automatically populating it allows you to reuse the same configuration file across all your hosts, simplifying automation if you have a lot of hosts to monitor.<\/p>\n<p>Start Agent 2<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nsystemctl enable zabbix-agent2\nsudo systemctl start zabbix-agent2\n<\/pre>\n<p>Add FW rule:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nufw allow from &#x5B;Zabbix server IP] to any port 10050 proto tcp\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Get the package for Debian 10 Buster: wget https:\/\/repo.zabbix.com\/zabbix\/5.4\/debian\/pool\/main\/z\/zabbix-release\/zabbix-release_5.4-1%2Bdebian10_all.deb Install the repo for Debian 10 Buster dpkg -i zabbix-release_5.4-1+debian10_all.deb Get the package for Debian 11 Bulleye wget https:\/\/repo.zabbix.com\/zabbix\/5.4\/debian\/pool\/main\/z\/zabbix-release\/zabbix-release_5.4-1%2Bdebian11_all.deb Install the repo for Debian 11 Bullseye dpkg -i zabbix-release_5.4-1+debian11_all.deb apt update apt full-upgrade For Agent 2 apt install zabbix-agent2 We now need to edit the configuration &#8230; <a title=\"Install Zabbix Agent2 Version 5.4 on Debian 10\/11\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2021\/11\/14\/install-zabbix-agent-on-debian-10\/\" aria-label=\"Read more about Install Zabbix Agent2 Version 5.4 on Debian 10\/11\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[133],"tags":[],"class_list":["post-6286","post","type-post","status-publish","format-standard","hentry","category-zabbix"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/6286","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=6286"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/6286\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=6286"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=6286"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=6286"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}