{"id":865,"date":"2018-06-20T11:28:36","date_gmt":"2018-06-20T09:28:36","guid":{"rendered":"http:\/\/itsimple.info\/?p=865"},"modified":"2026-01-21T16:25:48","modified_gmt":"2026-01-21T14:25:48","slug":"how-to-install-zabbix-proxy-on-centos","status":"publish","type":"post","link":"https:\/\/itsimple.info\/?p=865","title":{"rendered":"How To Install Zabbix Proxy On CentOS"},"content":{"rendered":"<p>Zabbix proxy is the way to have multiple hosts from different sites monitor by one central server<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-866\" src=\"https:\/\/itsimple.info\/wp-content\/uploads\/2018\/06\/zabbix-how-to-install-zabbix-proxy-on-centos-7-300x118.png\" alt=\"\" width=\"943\" height=\"371\" srcset=\"https:\/\/itsimple.info\/wp-content\/uploads\/2018\/06\/zabbix-how-to-install-zabbix-proxy-on-centos-7-300x118.png 300w, https:\/\/itsimple.info\/wp-content\/uploads\/2018\/06\/zabbix-how-to-install-zabbix-proxy-on-centos-7-768x302.png 768w, https:\/\/itsimple.info\/wp-content\/uploads\/2018\/06\/zabbix-how-to-install-zabbix-proxy-on-centos-7.png 871w\" sizes=\"auto, (max-width: 943px) 100vw, 943px\" \/><\/p>\n<p>*. Zabbix-proxy should be in the same version of the main server !<\/p>\n<p>*. SElinux is a great security addition but if you want to disabled it : nano \/etc\/selinux\/config -&gt; \u00a0 SELINUX=disabled (will disable the SElinux) .<\/p>\n<h2><strong>Install Zabbix-Proxy<\/strong><\/h2>\n<p>First update the repo files in order to get the latest version, in this example 3.4 :<\/p>\n<pre>rpm --import http:\/\/repo.zabbix.com\/RPM-GPG-KEY-ZABBIX\nrpm -ivh http:\/\/repo.zabbix.com\/zabbix\/4.0\/rhel\/7\/x86_64\/zabbix-release-4.0-1.el7.noarch.rpm<\/pre>\n<p>On CentOS 8 you might get error regarding libssh2 missing, you can install it in this way:<\/p>\n<p>To use libssh2 you must enable the EPEL repo. After that libssh2-devel can be installed<\/p>\n<pre>yum install epel-release\n\nyum install libssh2<\/pre>\n<p>In case of develop environment you can install the libssh2-devel<\/p>\n<pre>yum install libssh2-devel<\/pre>\n<p>Then install the zabbix proxy<\/p>\n<pre>yum install zabbix-proxy-mysql<\/pre>\n<p>After that install maria-db (mysql server if you haven&#8217;t done this from the Linux installer already).<\/p>\n<pre>yum install mariadb-server<\/pre>\n<p>Enable the server and make the service run with boot :<\/p>\n<pre>systemctl enable mariadb &amp;&amp; systemctl start mariadb<\/pre>\n<p>Lets start MariaDB installation, enter the password for SQL administrator (none if you run it for the first time,Then choose password) :<\/p>\n<pre>mysql_secure_installation\nmysql -u root -p<\/pre>\n<p>We will create Database called: zabbix_proxy<\/p>\n<pre>create database zabbix_proxy;<\/pre>\n<p>Lets create user for the Database=zabbix_user and the password=zabbix<\/p>\n<pre>grant all privileges on zabbix_proxy.* to zabbix_user@localhost identified by 'zabbix' ;\nflush privileges;\nexit<\/pre>\n<p>Then import initial schema and data. Make sure to insert correct version for the one installed<\/p>\n<div>Since Zabbix 6.x\/7.x, proxy DB init scripts moved to <strong><code>\/usr\/share\/zabbix-sql-scripts\/*<\/code><\/strong>, and for the proxy the file is typically <strong><code>proxy.sql<\/code><\/strong><\/div>\n<div>make sure the zabbix sciprts are installed<\/div>\n<div><\/div>\n<div>yum <!--ScriptorStartFragment-->install zabbix-sql-scripts<!--ScriptorEndFragment--><\/div>\n<p>then create the initial schema<\/p>\n<p><!--ScriptorStartFragment-->cat \/usr\/share\/zabbix\/sql-scripts\/mysql\/proxy.sql | mysql -u zabbix_user zabbix_proxy -p<\/p>\n<h2>configuring Zabbix proxy<\/h2>\n<p>nano \/etc\/zabbix\/zabbix_proxy.conf<\/p>\n<p>The values in the file should be corresponding with this setting according to this example:<\/p>\n<pre>Server=&lt;IP of your zabbix server&gt;\nHostname=&lt;Name of your proxy&gt;\nDBName=zabbix_proxy\nDBUser=zabbix_user\nDBPassword=zabbix<\/pre>\n<p>We need to open the firewall port for network comunication :<\/p>\n<pre>firewall-cmd --permanent --add-port=10050\/tcp\nfirewall-cmd --permanent --add-port=10051\/tcp\nfirewall-cmd --reload<\/pre>\n<p>And the last thing is to enable the zabbix proxy and make it load with boot :<\/p>\n<pre>systemctl enable zabbix-proxy\nsystemctl start zabbix-proxy<\/pre>\n<p>Now Follow the zabbix proxy log to make sure all is well :<\/p>\n<p>cat \/var\/log\/zabbix\/zabbix_proxy.log<\/p>\n<p>You can also make sure the server running with this :<\/p>\n<p>netstat -anp | grep zabbix_proxy<\/p>\n<h2>Configure Zabbix Proxy on Main Server<\/h2>\n<ul>\n<li class=\"level1\">\n<div class=\"li\">Go to: <em>Administration ? Proxies<\/em><\/div>\n<\/li>\n<li class=\"level1\">\n<div class=\"li\">Click on <em>Create proxy<\/em><\/div>\n<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-868\" src=\"https:\/\/itsimple.info\/wp-content\/uploads\/2018\/06\/proxy_add-300x255.png\" alt=\"\" width=\"698\" height=\"593\" srcset=\"https:\/\/itsimple.info\/wp-content\/uploads\/2018\/06\/proxy_add-300x255.png 300w, https:\/\/itsimple.info\/wp-content\/uploads\/2018\/06\/proxy_add.png 600w\" sizes=\"auto, (max-width: 698px) 100vw, 698px\" \/><\/p>\n<p>Active mode -&gt; the proxy will be the one connecting to server and send data.<\/p>\n<p>Passive mode -&gt; the server will be the one connecting to server and get data.<\/p>\n<p><strong>proxy hosts<\/strong> -&gt; is the server you want to monitor through the proxy server<\/p>\n<p>You can also set encryption communication (recommended)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Zabbix proxy is the way to have multiple hosts from different sites monitor by one central server *. Zabbix-proxy should be in the same version of the main server ! *. SElinux is a great security addition but if you want to disabled it : nano \/etc\/selinux\/config -&gt; \u00a0 SELINUX=disabled (will disable the SElinux) . [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,21,12,1],"tags":[],"class_list":["post-865","post","type-post","status-publish","format-standard","hentry","category-linux","category-operating-systems","category-tutorials","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/865","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=865"}],"version-history":[{"count":1,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/865\/revisions"}],"predecessor-version":[{"id":3104,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/865\/revisions\/3104"}],"wp:attachment":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=865"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=865"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=865"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}