{"id":12745,"date":"2022-05-14T14:54:58","date_gmt":"2022-05-14T11:54:58","guid":{"rendered":"https:\/\/kifarunix.com\/?p=12745"},"modified":"2024-03-09T13:38:26","modified_gmt":"2024-03-09T10:38:26","slug":"install-zabbix-server-on-rocky-linux","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-zabbix-server-on-rocky-linux\/","title":{"rendered":"Install Zabbix Server on Rocky Linux"},"content":{"rendered":"\n<p>In this guide, we are going to learn how to install Zabbix server on Rocky Linux. <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\">Install Zabbix Server on Rocky Linux<\/h2>\n\n\n\n<p>Zabbix can be built from the source code or can be installed from Zabbix repository.<\/p>\n\n\n\n<p>In this guide, we will install Zabbix server via the<a href=\"https:\/\/www.zabbix.com\/download\" target=\"_blank\" rel=\"noreferrer noopener\"> Zabbix Rocky Linux repositories<\/a>.<\/p>\n\n\n\n<p>Thus, run the command below to install Zabbix Rocky Linux repositories;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf install https:\/\/repo.zabbix.com\/zabbix\/6.0\/rhel\/8\/x86_64\/zabbix-release-6.0-1.el8.noarch.rpm<\/code><\/pre>\n\n\n\n<p>Zabbix is a PHP based app. Thus, we will use PHP 7.4 in this guide.<\/p>\n\n\n\n<p>To be able to install Zabbix with PHP 7.4 on Rocky Linux, enable PHP 7.4 modules;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf module -y reset php<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf module -y enable php:7.4<\/code><\/pre>\n\n\n\n<p>Next, install Zabbix Server and other required Zabbix packages on Rocky Linux;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent<\/code><\/pre>\n\n\n\n<p>Sample command output;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>\n============================================================================================================================================================================\n Package                                        Architecture               Version                                                      Repository                     Size\n============================================================================================================================================================================\nInstalling:\n zabbix-agent                                   x86_64                     6.0.4-1.el8                                                  zabbix                        528 k\n zabbix-apache-conf                             noarch                     6.0.4-1.el8                                                  zabbix                         22 k\n zabbix-selinux-policy                          x86_64                     6.0.4-1.el8                                                  zabbix                        280 k\n zabbix-server-mysql                            x86_64                     6.0.4-1.el8                                                  zabbix                        1.6 M\n zabbix-sql-scripts                             noarch                     6.0.4-1.el8                                                  zabbix                        6.5 M\n zabbix-web-mysql                               noarch                     6.0.4-1.el8                                                  zabbix                         21 k\nInstalling dependencies:\n OpenIPMI-libs                                  x86_64                     2.0.31-3.el8                                                 baseos                        508 k\n apr                                            x86_64                     1.6.3-12.el8                                                 appstream                     128 k\n apr-util                                       x86_64                     1.6.1-6.el8.1                                                appstream                     104 k\n fping                                          x86_64                     4.2-2.el8                                                    epel                           43 k\n httpd                                          x86_64                     2.4.37-43.module+el8.5.0+747+83fae388.3                      appstream                     1.4 M\n httpd-filesystem                               noarch                     2.4.37-43.module+el8.5.0+747+83fae388.3                      appstream                      39 k\n httpd-tools                                    x86_64                     2.4.37-43.module+el8.5.0+747+83fae388.3                      appstream                     106 k\n mariadb-connector-c                            x86_64                     3.1.11-2.el8_3                                               appstream                     199 k\n mariadb-connector-c-config                     noarch                     3.1.11-2.el8_3                                               appstream                      14 k\n mod_http2                                      x86_64                     1.15.7-3.module+el8.5.0+695+1fa8055e                         appstream                     153 k\n nginx-filesystem                               noarch                     1:1.14.1-9.module+el8.4.0+542+81547229                       appstream                      23 k\n php-bcmath                                     x86_64                     7.4.19-1.module+el8.5.0+696+61e7c9ba                         appstream                      79 k\n php-common                                     x86_64                     7.4.19-1.module+el8.5.0+696+61e7c9ba                         appstream                     701 k\n php-fpm                                        x86_64                     7.4.19-1.module+el8.5.0+696+61e7c9ba                         appstream                     1.6 M\n php-gd                                         x86_64                     7.4.19-1.module+el8.5.0+696+61e7c9ba                         appstream                      84 k\n php-json                                       x86_64                     7.4.19-1.module+el8.5.0+696+61e7c9ba                         appstream                      73 k\n php-ldap                                       x86_64                     7.4.19-1.module+el8.5.0+696+61e7c9ba                         appstream                      85 k\n php-mbstring                                   x86_64                     7.4.19-1.module+el8.5.0+696+61e7c9ba                         appstream                     483 k\n php-mysqlnd                                    x86_64                     7.4.19-1.module+el8.5.0+696+61e7c9ba                         appstream                     192 k\n php-pdo                                        x86_64                     7.4.19-1.module+el8.5.0+696+61e7c9ba                         appstream                     122 k\n php-xml                                        x86_64                     7.4.19-1.module+el8.5.0+696+61e7c9ba                         appstream                     173 k\n rocky-logos-httpd                              noarch                     85.0-3.el8                                                   baseos                         22 k\n unixODBC                                       x86_64                     2.3.7-1.el8                                                  appstream                     453 k\n zabbix-web                                     noarch                     6.0.4-1.el8                                                  zabbix                        7.9 M\n zabbix-web-deps                                noarch                     6.0.4-1.el8                                                  zabbix                         22 k\nInstalling weak dependencies:\n apr-util-bdb                                   x86_64                     1.6.1-6.el8.1                                                appstream                      23 k\n apr-util-openssl                               x86_64                     1.6.1-6.el8.1                                                appstream                      26 k\n\nTransaction Summary\n============================================================================================================================================================================\nInstall  33 Packages\n\nTotal download size: 24 M\nInstalled size: 77 M\nIs this ok [y\/N]: y\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install MySQL and Create Zabbix Database and Database User<\/h3>\n\n\n\n<p>Install MySQL 8 on Rocky Linux;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf install mysql-server<\/code><\/pre>\n\n\n\n<p>Start MySQL service;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl enable --now mysqld<\/code><\/pre>\n\n\n\n<p>Run MySQL secure install script;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql_secure_installation<\/code><\/pre>\n\n\n\n<p>Login to MariaDB server and create a database and a database user for Zabbix. The database user should have all the privileges on the zabbix database.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>mysql -u root -p<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>create database zabbixdb character set utf8 collate utf8_bin;<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>create user zabbixadmin@localhost identified by 'P@SSw0RD';<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>grant all on zabbixdb.* to zabbixadmin@localhost;<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>flush privileges;\nquit<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Configuring Zabbix on Rocky Linux<\/h3>\n\n\n\n<p>To begin with, configure Zabbix database connection details.<\/p>\n\n\n\n<p>Open the configuration file, <strong><code>\/etc\/zabbix\/zabbix_server.conf<\/code><\/strong>, and replace the values for&nbsp;<strong>DBName<\/strong>,&nbsp;<strong>DBUser<\/strong>,&nbsp;<strong>DBPassword<\/strong>&nbsp;with what you set while creating database. Uncomment the line <code><strong># DBHost=localhost<\/strong><\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vim \/etc\/zabbix\/zabbix_server.conf<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>...\n<strong>DBHost=localhost<\/strong>\n...\n<strong>DBName=zabbixdb\n<\/strong>...\n<strong>DBUser=zabbixadmin\n<\/strong>...\n<strong>DBPassword=P@SSw0RD\n<\/strong>...\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Import Zabbix Default Database and Initial Data<\/h3>\n\n\n\n<p>Import initial Zabbix database schema and data to the newly create database.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>zcat \/usr\/share\/doc\/zabbix-sql-scripts\/mysql\/server.sql.gz | mysql -u zabbixadmin -p zabbixdb<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Running Zabbix Server and Agent<\/h3>\n\n\n\n<p>Restart and enable Zabbix server, agent deamon to run on system start.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart zabbix-server zabbix-agent httpd php-fpm<\/code><\/pre>\n\n\n\n<p>If firewall is running, open TCP port 10051 and HTTP\/HTTPS for remote connection.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>firewall-cmd --add-port={10051,80,443}\/tcp --permanent\nfirewall-cmd --reload<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Finalize Zabbix Setup on 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&nbsp;<strong>http:\/\/&lt;server-IP&gt;\/zabbix<\/strong>.<\/p>\n\n\n\n<p>When access the address above, the first page you land on is Zabbix welcome page.<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/zabbix-welcome-page.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1069\" height=\"675\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/zabbix-welcome-page.png\" alt=\"\" class=\"wp-image-12736\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/zabbix-welcome-page.png?v=1652515621 1069w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/zabbix-welcome-page-768x485.png?v=1652515621 768w\" sizes=\"(max-width: 1069px) 100vw, 1069px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>Click Next Step to verify if all the Zabbix requirements have been met.<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/zabbix-pre-reqs.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1071\" height=\"672\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/zabbix-pre-reqs.png\" alt=\"\" class=\"wp-image-12737\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/zabbix-pre-reqs.png?v=1652515656 1071w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/zabbix-pre-reqs-768x482.png?v=1652515656 768w\" sizes=\"(max-width: 1071px) 100vw, 1071px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>Configure Zabbix database connection using the connection details set before.<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/zabbix-db-connection.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1073\" height=\"680\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/zabbix-db-connection.png\" alt=\"Install Zabbix Server on Rocky Linux\" class=\"wp-image-12738\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/zabbix-db-connection.png?v=1652515671 1073w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/zabbix-db-connection-768x487.png?v=1652515671 768w\" sizes=\"(max-width: 1073px) 100vw, 1073px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>Setup the Zabbix server details.<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/zabbix-server-name.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1072\" height=\"679\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/zabbix-server-name.png\" alt=\"Install Zabbix Server on Rocky Linux\" class=\"wp-image-12739\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/zabbix-server-name.png?v=1652515743 1072w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/zabbix-server-name-768x486.png?v=1652515743 768w\" sizes=\"(max-width: 1072px) 100vw, 1072px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>On the Pre-installation summary, verify if all the configurations are fine.<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/zabbix-install-summary.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1073\" height=\"680\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/zabbix-install-summary.png\" alt=\"Install Zabbix Server on Rocky Linux\" class=\"wp-image-12740\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/zabbix-install-summary.png?v=1652515763 1073w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/zabbix-install-summary-768x487.png?v=1652515763 768w\" sizes=\"(max-width: 1073px) 100vw, 1073px\" \/><\/figure><\/a><\/div>\n\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\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/zabbix-installed.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1073\" height=\"685\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/zabbix-installed.png\" alt=\"Install Zabbix Server on Rocky Linux\" class=\"wp-image-12741\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/zabbix-installed.png?v=1652515773 1073w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/zabbix-installed-768x490.png?v=1652515773 768w\" sizes=\"(max-width: 1073px) 100vw, 1073px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>You have successfully setup Zabbix Frontend. Click&nbsp;<strong>Finish<\/strong>&nbsp;to get to Zabbix login interface.<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/09\/zabbix-login-int.png\" class=\"td-modal-image\"><div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"965\" height=\"571\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/09\/zabbix-login-int.png\" alt=\"\" class=\"wp-image-10337\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/09\/zabbix-login-int.png?v=1630820667 965w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/09\/zabbix-login-int-768x454.png?v=1630820667 768w\" sizes=\"(max-width: 965px) 100vw, 965px\" \/><\/figure><\/div><\/a><\/div>\n\n\n\n<p>The default login credentials are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Username (Note the Upper case A): &nbsp;<strong>Admin<\/strong> <\/li>\n\n\n\n<li>Password: <strong>zabbix<\/strong><\/li>\n<\/ul>\n\n\n\n<p>When you successfully login to Zabbix, you should land on the default dashboard.<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/zabbix-dashboard.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1905\" height=\"948\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/zabbix-dashboard.png\" alt=\"\" class=\"wp-image-12742\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/zabbix-dashboard.png?v=1652515996 1905w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/zabbix-dashboard-768x382.png?v=1652515996 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/zabbix-dashboard-1536x764.png?v=1652515996 1536w\" sizes=\"(max-width: 1905px) 100vw, 1905px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>Well, there you go.<\/p>\n\n\n\n<p>That concludes our guide on how to install Zabbix server.<\/p>\n\n\n\n<p>Read More on <a href=\"https:\/\/www.zabbix.com\/documentation\/current\/\" target=\"_blank\" rel=\"noreferrer noopener\">Documentation page<\/a>.<\/p>\n\n\n\n<p>Other Tutorials;<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-zabbix-server-on-ubuntu\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install Zabbix Server on Ubuntu 22.04<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-and-setup-nagios-on-ubuntu\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install and Setup Nagios on Ubuntu 22.04<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, we are going to learn how to install Zabbix server on Rocky Linux. Zabbix is an enterprise class monitoring solution for any<\/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],"tags":[5149,5151,5150],"class_list":["post-12745","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","category-monitoring","tag-rocky-linux-zabbix-install","tag-zabbix-6-x","tag-zabbix-install-rocky-linux","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\/12745"}],"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=12745"}],"version-history":[{"count":4,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/12745\/revisions"}],"predecessor-version":[{"id":20516,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/12745\/revisions\/20516"}],"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=12745"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=12745"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=12745"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}