{"id":3787,"date":"2019-07-26T22:49:16","date_gmt":"2019-07-26T19:49:16","guid":{"rendered":"https:\/\/kifarunix.com\/?p=3787"},"modified":"2024-03-12T07:31:46","modified_gmt":"2024-03-12T04:31:46","slug":"install-zabbix-server-on-debian-10-buster","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-zabbix-server-on-debian-10-buster\/","title":{"rendered":"Install Zabbix Server on Debian 10 Buster"},"content":{"rendered":"\n<p>In this guide, we are going to learn how to install Zabbix server on Debian 10 Buster. <a rel=\"noreferrer noopener\" aria-label=\"Zabbix (opens in a new tab)\" href=\"https:\/\/www.zabbix.com\/solutions\" target=\"_blank\">Zabbix<\/a> is an enterprise class monitoring solution for any kind of IT infrastructure, services, applications, cloud resources.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installing Zabbix Server on Debian 10 Buster<\/h2>\n\n\n\n<p>Zabbix can be built from the source code or can be installed from Zabbix repository. In this guide, we are going to use Zabbix repository.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Install Zabbix APT repository <\/h3>\n\n\n\n<p>Debian 10 Buster do not include Zabbix repository by default. Hence, you can install it by running the command below. Note that <a href=\"https:\/\/www.zabbix.com\/life_cycle_and_release_policy\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Zabbix 4.2 (opens in a new tab)\">Zabbix 4.2<\/a> is the current stable release as of this writing. <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>wget https:\/\/repo.zabbix.com\/zabbix\/4.2\/debian\/pool\/main\/z\/zabbix-release\/zabbix-release_4.2-1+buster_all.deb\napt install .\/zabbix-release_4.2-1+buster_all.deb<\/code><\/pre>\n\n\n\n<p>Next, run system update.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt update -y\napt upgrade -y<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install Zabbix  Server, Frontend and Agent<\/h3>\n\n\n\n<p>Zabbix uses the LAMP stack components, Apache, MariaDB and PHP. To install these components, run the command below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt install zabbix-server-mysql zabbix-frontend-php<\/code><\/pre>\n\n\n\n<p>The above command installs Apache 2.43, Mariadb 10.3 and PHP 7.3<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apache2 -v\nServer version: Apache\/2.4.38 (Debian)\nServer built:   2019-04-07T18:15:40<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>php -v\nPHP 7.3.4-2 (cli) (built: Apr 13 2019 19:05:48) ( NTS )\nCopyright (c) 1997-2018 The PHP Group\nZend Engine v3.3.4, Copyright (c) 1998-2018 Zend Technologies\n    with Zend OPcache v7.3.4-2, Copyright (c) 1999-2018, by Zend Technologies<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mariadb -V\nmariadb  Ver 15.1 Distrib 10.3.15-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2<\/code><\/pre>\n\n\n\n<p>Also, if you need to monitor the Zabbix server itself, you need to install Zabbix agent.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt install zabbix-agent<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Create Zabbix MariaDB Database and User<\/h3>\n\n\n\n<p>Once the installation of the Zabbix components completes, begin by creating a MariaDB database for Zabbix and a Zabbix user.<\/p>\n\n\n\n<p>However, run <strong>mysql_secure_installation<\/strong> MariaDB initial security script to remove anonymous users, test databases and to disable remote root login.<\/p>\n\n\n\n<p>Note that by default, MariaDB 10.3 uses unix socket for authentication and hence, you can login without password set (Even if you set password with <strong>mysql_secure_installation<\/strong>). Therefore, you can login by just typing <strong>mysql<\/strong> or <strong>mysql -u root<\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>mysql -u root<\/code><\/pre>\n\n\n\n<p>Create Zabbix database.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>create database zabbixdb;<\/code><\/pre>\n\n\n\n<p>Create the Zabbix database user and grant all the privileges on Zabbix database.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>grant all on zabbixdb.* to zabbixadmin@localhost identified by 'Str0NGPass';<\/code><\/pre>\n\n\n\n<p>Reload the privilege tables to ensure that all changes made take effect immediately and exit the database.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>flush privileges;\nquit<\/code><\/pre>\n\n\n\n<p>If you need enable root user password authentication, login to database and run the command below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>mysql -u root\nSET old_passwords=0;\nALTER USER root@localhost IDENTIFIED BY 'StronGP@SS';\nflush privileges;\nquit<\/code><\/pre>\n\n\n\n<p>Next, import initial Zabbix database schema and data to the newly create database.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>zcat \/usr\/share\/doc\/zabbix-server-mysql\/create.sql.gz | mysql -u zabbixadmin -p zabbixdb<\/code><\/pre>\n\n\n\n<p>Next, open the Zabbix configuration file and set the value of <strong>DBName<\/strong>, <strong>DBUser<\/strong>, <strong>DBPassword<\/strong> to reflect your settings. Also, configure local database connection.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>...\nDBHost=localhost\n...\nDBName=zabbixdb\n...\nDBUser=zabbixadmin\n...\nDBPassword=Str0NGPass<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Configure PHP for Zabbix frontend<\/h3>\n\n\n\n<p>Zabbix frontend is written in PHP. On of the configuration that is required is to set the PHP timezone. Hence, edit the file, and set the timezone for PHP 7.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>vim \/etc\/zabbix\/apache.conf<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>\n...\n    &lt;IfModule mod_php7.c&gt;\n        php_value max_execution_time 300\n        php_value memory_limit 128M\n        php_value post_max_size 16M\n        php_value upload_max_filesize 2M\n        php_value max_input_time 300\n        php_value max_input_vars 10000\n        php_value always_populate_raw_post_data -1\n        # php_value date.timezone Europe\/Riga\n        php_value date.timezone Africa\/Nairobi\n    &lt;\/IfModule&gt;\n<\/code><\/pre>\n\n\n\n<p>Restart Apache Web server.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl restart apache2<\/code><\/pre>\n\n\n\n<p>The Zabbix frontend configuration will be finalized from the web UI.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Running Zabbix server and Agent<\/h3>\n\n\n\n<p>Once you are done with the configuration, restart the Zabbix server and agent and enable them to run on system boot.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl restart zabbix-server zabbix-agent\nsystemctl enable zabbix-server zabbix-agent<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Configure Zabbix Web User Interface<\/h3>\n\n\n\n<p>To complete Zabbix installation, navigate to the browser and access your Zabbix server via the address <strong>http:\/\/&lt;server-IP&gt;\/zabbix<\/strong>. When access the address above, the first page you land on is Zabbix welcome page.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/zabbix-welcom-page.png\"><img loading=\"lazy\" decoding=\"async\" width=\"769\" height=\"480\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/zabbix-welcom-page.png\" alt=\"Install Zabbix  Server on Debian 10 Buster\" class=\"wp-image-3793\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/zabbix-welcom-page.png 769w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/zabbix-welcom-page-768x479.png 768w\" sizes=\"(max-width: 769px) 100vw, 769px\" \/><\/a><\/figure><\/div>\n\n\n<p>Click Next Step to verify if all the Zabbix requirements have been met.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/zabbix-requirements.png\"><img loading=\"lazy\" decoding=\"async\" width=\"766\" height=\"456\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/zabbix-requirements.png\" alt=\"\" class=\"wp-image-3794\" title=\"\"><\/a><\/figure><\/div>\n\n\n<p>Configure Zabbix database connection using the connection details set above.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/zabbix-db-connection.png\"><img loading=\"lazy\" decoding=\"async\" width=\"760\" height=\"453\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/zabbix-db-connection.png\" alt=\"Debian 10 buster zabbix db connections\" class=\"wp-image-3795\" title=\"\"><\/a><\/figure><\/div>\n\n\n<p>Setup the Zabbix server details. You can leave the default settings.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/zabbix-server.png\"><img loading=\"lazy\" decoding=\"async\" width=\"762\" height=\"449\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/zabbix-server.png\" alt=\"set zabbix server details\" class=\"wp-image-3796\" title=\"\"><\/a><\/figure><\/div>\n\n\n<p>On the Pre-installation summary, verify if all the configurations are fine.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/zabbix-preinstallation.png\"><img loading=\"lazy\" decoding=\"async\" width=\"759\" height=\"453\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/zabbix-preinstallation.png\" alt=\"Zabbix preinstallation summary\" class=\"wp-image-3797\" title=\"\"><\/a><\/figure><\/div>\n\n\n<p>If all is well, click Next step to finish the installation. If all is well, you should see Zabbix installation congratulatory message.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"760\" height=\"450\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/zabbix-installed.png\" alt=\"\" class=\"wp-image-3798\" title=\"\"><\/figure><\/div>\n\n\n<p>You have successfully setup Zabbix Frontend. Click <strong>Finish<\/strong> to get to Zabbix login interface.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/zabbix-login.png\"><img loading=\"lazy\" decoding=\"async\" width=\"339\" height=\"401\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/zabbix-login.png\" alt=\"Zabbix login page\" class=\"wp-image-3799\" title=\"\"><\/a><\/figure><\/div>\n\n\n<p>The default login credentials are <strong>admin<\/strong> as the username and <strong>zabbix<\/strong> as the password. When you successfully login to Zabbix, you should land on the default dashboard.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/zabbix-dashboard.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1349\" height=\"637\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/zabbix-dashboard.png\" alt=\"Zabbix default dashboard Debian 10 buster\" class=\"wp-image-3800\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/zabbix-dashboard.png 1349w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/zabbix-dashboard-768x363.png 768w\" sizes=\"(max-width: 1349px) 100vw, 1349px\" \/><\/a><\/figure><\/div>\n\n\n<p>Well, there you go. You have successfully installed Zabbix server on Debian 10 Buster. In our next guide, we will how to monitor remote hosts using Zabbix server.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Related Tutorials<\/h3>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/how-to-install-and-configure-zabbix-4-0-from-source-on-fedora-29-fedora-28-centos-7\/\" target=\"_blank\">How to Install and Configure Zabbix 4.0 from Source on Fedora 29\/Fedora 28\/CentOS 7<\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/install-nagios-core-on-debian-10-buster\/\" target=\"_blank\">Install Nagios Core on Debian 10 Buster<\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/install-and-configure-snmp-on-debian-10-buster\/\" target=\"_blank\">Install and Configure SNMP on Debian 10 Buster<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/how-to-install-and-configure-alienvault-ossim-5-5-on-virtualbox\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">How to install and configure AlienVault OSSIM 5.5 on VirtualBox<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, we are going to learn how to install Zabbix server on Debian 10 Buster. Zabbix is an enterprise class monitoring solution for<\/p>\n","protected":false},"author":1,"featured_media":12691,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,72,261],"tags":[1039,5135,1054,1052,1053],"class_list":["post-3787","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","category-monitoring","category-zabbix","tag-debian-10-buster","tag-install-zabbix-server-on-debian-10-buster","tag-latest-zabbix","tag-zabbix","tag-zabbix-4-2","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/3787"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=3787"}],"version-history":[{"count":8,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/3787\/revisions"}],"predecessor-version":[{"id":21168,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/3787\/revisions\/21168"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/12691"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=3787"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=3787"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=3787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}