{"id":2472,"date":"2016-08-08T13:44:00","date_gmt":"2016-08-08T17:44:00","guid":{"rendered":"https:\/\/www.globo.tech\/learning-center\/?p=2472"},"modified":"2017-12-12T15:47:43","modified_gmt":"2017-12-12T20:47:43","slug":"install-zabbix-monitoring-server-centos-7","status":"publish","type":"post","link":"https:\/\/www.globo.tech\/learning-center\/install-zabbix-monitoring-server-centos-7\/","title":{"rendered":"How to install Zabbix monitoring server on CentOS 7"},"content":{"rendered":"<h1>How to install Zabbix monitoring server on CentOS 7<\/h1>\n<p>The Zabbix software package is a highly customizable and flexible server- and software-monitoring tool. A single instance of Zabbix on a server can be used to gather accurate statistics and performance data on multiple physical or virtual servers. Zabbix may also be used to monitor any device with an SNMP agent such as routers, switches, and even some cooling and power systems. When installed on a monitored server, Zabbix agent makes a vast array of data available for monitoring, including CPU load, memory usage, disk space, network load, and active processes. Zabbix can use HTTP\/SNMP to retrieve basic monitoring information from other servers without installing any software on those hosts. Data collected by Zabbix are stored in a relational database for easy retrieval and ready analysis. In this tutorial, we will show you how to install Zabbix on CentOS 7 using MariaDB as our database backend.<\/p>\n<h2>Getting Started<\/h2>\n<p>Confirm that you have the following before you follow this guide:<br \/>\n\u2022 1 Node (<a href=\"https:\/\/www.globo.tech\/cloud-server-pricing\" target=\"_blank\">Cloud Server<\/a> or <a href=\"http:\/\/www.globo.tech\/dedicated-server-hosting\" target=\"_blank\">Dedicated Server<\/a>) running CentOS 7.<br \/>\n\u2022 Root access to the node or one sudo non-root user<\/p>\n<h2>Tutorial<\/h2>\n<p>Before you start to install Zabbix, make sure that SELinux is disabled. <\/p>\n<p><code>setenforce 0<br \/>\nsed -i 's\/enforcing\/disabled\/' \/etc\/sysconfig\/selinux<br \/>\nsed -i 's\/enforcing\/disabled\/' \/etc\/selinux\/config<\/code><\/p>\n<p>The EPEL repository contains packages upon which Zabbix is dependent. Use Yum to install these packages as follows:<\/p>\n<p><code>yum install -y nano wget<\/code><\/p>\n<p>All dependencies should now be installed. <\/p>\n<p>Add the Zabbix repository to your instance of Yum:<\/p>\n<p><code>rpm -ivh http:\/\/repo.zabbix.com\/zabbix\/3.0\/rhel\/7\/x86_64\/zabbix-release-3.0-1.el7.noarch.rpm<\/code><\/p>\n<p>Zabbix has no capacity for data storage or analysis. Rather, it feeds all the data it retrieves to a relational database backend. We will use a fork of MySQL called MariDB as our backend in this tutorial. <\/p>\n<p>To install MariaDB Database Server use Yum as follows:<\/p>\n<p><code>yum install -y mariadb mariadb-server<\/code><\/p>\n<p>To assure monitoring data collected by Zabbix is collected whenever the server is running, we will make MariaDB available immediately whenever the CentOS server restarts. To make it so execute the following commands:<\/p>\n<p><code>systemctl start mariadb.service<br \/>\nsystemctl enable mariadb.service<\/code><\/p>\n<p>As a variant of MySQL, MariaDB is not inherently secure. The following commands will secure your database server and set your root password:<\/p>\n<p><code>mysql_secure_installation<\/code><\/p>\n<p>Zabbix will require its own dedicated database within your newly running and initialized instance of MariaDB. We recommend you create a unique user within MariaDB that uniquely has access to that database. To create the database and user for Zabbix enter these command, replacing \u201czabbixpassword\u201d with your own secure password:<\/p>\n<p><code>mysql -u root -p<\/code><\/p>\n<p><code>create database zabbix character set utf8 collate utf8_bin;<br \/>\ngrant all privileges on zabbix.* to zabbix@localhost identified by 'zabbixpassword';<br \/>\nexit<\/code><\/p>\n<p>User : zabbix &#8211; Database : zabbix &#8211; Password : zabbixpassword<\/p>\n<p>Now that the database is prepared, install Zabbix server with the correct MariaDB support packages as follows:<\/p>\n<p><code>yum install -y zabbix-server-mysql zabbix-web-mysql<\/code><\/p>\n<p>Import the contents (schema, images, and data) of the default database provided by Zabbix into your database server ( version installed here : 3.0.4 ):<\/p>\n<p><code>cd \/usr\/share\/doc\/zabbix-server-mysql-3.0.4\/<br \/>\ngunzip create.sql.gz<br \/>\nmysql -u root -p zabbix < create.sql<\/code><\/p>\n<p>Zabbix server is installed and the database is properly configured. We are ready to configure PHP and the HTTP (Apache) server to work with Zabbix.<\/p>\n<p>The default settings for a number of PHP parameters will not interact well with Zabbix. To maximize performance, open your php.ini file with a text editor (we use nano) and modify those lines with the parameters described in the following so that they have the values depicted there:<\/p>\n<p><code>nano \/etc\/php.ini<\/code><\/p>\n<p><code>max_execution_time = 600<br \/>\nmax_input_time = 600<br \/>\nmemory_limit = 256M<br \/>\npost_max_size = 32M<br \/>\nupload_max_filesize = 16M<br \/>\ndate.timezone = America\/Toronto<\/code><\/p>\n<p>Don't forget to remove the comment in front of date.timezone.<\/p>\n<p>Next, you need to tell the HTTP server how to access the zabbix database you created above. Find the line in the configuration file \/etc\/zabbix\/zabbix_server.conf that corresponds to the database password you set above and add the correct value:<\/p>\n<p><code>nano \/etc\/zabbix\/zabbix_server.conf<\/code><\/p>\n<p>When Yum installed Zabbix, it created the file \/etc\/httpd\/conf.d\/zabbix.conf. Edit this Zabbix configuration file so that it looks like this:<\/p>\n<p><code class=\"gris\">DBHost=localhost<br \/>\nDBName=zabbix<br \/>\nDBUser=zabbix<br \/>\nDBPassword=zabbixpassword<\/code><\/p>\n<p>To use Zabbix restart your web server. If the HTTP Server has not been configured to launch when the CentOS server boots, use the following command to enable that behavior:<\/p>\n<p><code>systemctl restart httpd.service<br \/>\nsystemctl enable httpd.service<\/code><\/p>\n<p>With the HTTP Server running, start the Zabbix server service and set it to start on boot:<\/p>\n<p><code>systemctl start zabbix-server.service<br \/>\nsystemctl enable zabbix-server.service<\/code><\/p>\n<p>Zabbix is now available on your server. <\/p>\n<p>You may finish your setup online by going to:<\/p>\n<p><code class=\"gris\">http:\/\/your_ip\/zabbix<\/code><\/p>\n<p>Replace your_ip with the IP address of your server. Click next repeatedly until you are prompted to enter the configuration data for the DB connection. Fill in the database information, using the parameters you defined earlier. Then continue to click through until installation is finished.<\/p>\n<p>Use the default login information to log into your control panel<\/p>\n<p><code class=\"gris\">Login : Admin<br \/>\nPassword : zabbix<\/code><\/p>\n<p>Zabbix is installed and configured.<\/p>\n<h2>Conclusion<\/h2>\n<p>You have successfully installed Zabbix on a CentOS 7 server. With the MariaDB backend in place, you are ready to monitor all of your servers from one central location. If you liked this Knowledge Base article please share it with your friends. <\/p>\n<p>If you found this article helpful, feel free to share it with your friends and let us know in the comments below! <\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>How to install Zabbix monitoring server on CentOS 7 The Zabbix software package is a highly customizable and flexible server- and software-monitoring tool. A single instance of Zabbix on a server can be used to gather accurate statistics and performance data on multiple physical or virtual servers. Zabbix may also be used to monitor any<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[72],"tags":[],"class_list":["post-2472","post","type-post","status-publish","format-standard","hentry","category-monitoring","operating_system-centos-7"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to install Zabbix monitoring server on CentOS 7 - Globo.Tech<\/title>\n<meta name=\"description\" content=\"This tutorial will show you how to install Zabbix monitoring server to your CentOS 7 server. Read now &amp; Enjoy this flexible server\/software monitoring tool!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.globo.tech\/learning-center\/install-zabbix-monitoring-server-centos-7\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to install Zabbix monitoring server on CentOS 7 - Globo.Tech\" \/>\n<meta property=\"og:description\" content=\"This tutorial will show you how to install Zabbix monitoring server to your CentOS 7 server. Read now &amp; Enjoy this flexible server\/software monitoring tool!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.globo.tech\/learning-center\/install-zabbix-monitoring-server-centos-7\/\" \/>\n<meta property=\"og:site_name\" content=\"Globo.Tech\" \/>\n<meta property=\"article:published_time\" content=\"2016-08-08T17:44:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-12-12T20:47:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2016\/09\/GloboTech-Logo.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"963\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"GloboTech Communications\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"GloboTech Communications\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-zabbix-monitoring-server-centos-7\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-zabbix-monitoring-server-centos-7\\\/\"},\"author\":{\"name\":\"GloboTech Communications\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/#\\\/schema\\\/person\\\/e17784b37f4a4f49b7bc611847912e87\"},\"headline\":\"How to install Zabbix monitoring server on CentOS 7\",\"datePublished\":\"2016-08-08T17:44:00+00:00\",\"dateModified\":\"2017-12-12T20:47:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-zabbix-monitoring-server-centos-7\\\/\"},\"wordCount\":780,\"commentCount\":0,\"articleSection\":[\"Monitoring\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-zabbix-monitoring-server-centos-7\\\/\",\"url\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-zabbix-monitoring-server-centos-7\\\/\",\"name\":\"How to install Zabbix monitoring server on CentOS 7 - Globo.Tech\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/#website\"},\"datePublished\":\"2016-08-08T17:44:00+00:00\",\"dateModified\":\"2017-12-12T20:47:43+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/#\\\/schema\\\/person\\\/e17784b37f4a4f49b7bc611847912e87\"},\"description\":\"This tutorial will show you how to install Zabbix monitoring server to your CentOS 7 server. Read now & Enjoy this flexible server\\\/software monitoring tool!\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-zabbix-monitoring-server-centos-7\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-zabbix-monitoring-server-centos-7\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-zabbix-monitoring-server-centos-7\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to install Zabbix monitoring server on CentOS 7\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/#website\",\"url\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/\",\"name\":\"Globo.Tech\",\"description\":\"Welcome to the Official Globo.Tech Learning Center\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/#\\\/schema\\\/person\\\/e17784b37f4a4f49b7bc611847912e87\",\"name\":\"GloboTech Communications\",\"sameAs\":[\"http:\\\/\\\/www.gtcomm.net\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to install Zabbix monitoring server on CentOS 7 - Globo.Tech","description":"This tutorial will show you how to install Zabbix monitoring server to your CentOS 7 server. Read now & Enjoy this flexible server\/software monitoring tool!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.globo.tech\/learning-center\/install-zabbix-monitoring-server-centos-7\/","og_locale":"en_US","og_type":"article","og_title":"How to install Zabbix monitoring server on CentOS 7 - Globo.Tech","og_description":"This tutorial will show you how to install Zabbix monitoring server to your CentOS 7 server. Read now & Enjoy this flexible server\/software monitoring tool!","og_url":"https:\/\/www.globo.tech\/learning-center\/install-zabbix-monitoring-server-centos-7\/","og_site_name":"Globo.Tech","article_published_time":"2016-08-08T17:44:00+00:00","article_modified_time":"2017-12-12T20:47:43+00:00","og_image":[{"width":1920,"height":963,"url":"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2016\/09\/GloboTech-Logo.png","type":"image\/png"}],"author":"GloboTech Communications","twitter_misc":{"Written by":"GloboTech Communications","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.globo.tech\/learning-center\/install-zabbix-monitoring-server-centos-7\/#article","isPartOf":{"@id":"https:\/\/www.globo.tech\/learning-center\/install-zabbix-monitoring-server-centos-7\/"},"author":{"name":"GloboTech Communications","@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87"},"headline":"How to install Zabbix monitoring server on CentOS 7","datePublished":"2016-08-08T17:44:00+00:00","dateModified":"2017-12-12T20:47:43+00:00","mainEntityOfPage":{"@id":"https:\/\/www.globo.tech\/learning-center\/install-zabbix-monitoring-server-centos-7\/"},"wordCount":780,"commentCount":0,"articleSection":["Monitoring"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.globo.tech\/learning-center\/install-zabbix-monitoring-server-centos-7\/","url":"https:\/\/www.globo.tech\/learning-center\/install-zabbix-monitoring-server-centos-7\/","name":"How to install Zabbix monitoring server on CentOS 7 - Globo.Tech","isPartOf":{"@id":"https:\/\/www.globo.tech\/learning-center\/#website"},"datePublished":"2016-08-08T17:44:00+00:00","dateModified":"2017-12-12T20:47:43+00:00","author":{"@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87"},"description":"This tutorial will show you how to install Zabbix monitoring server to your CentOS 7 server. Read now & Enjoy this flexible server\/software monitoring tool!","breadcrumb":{"@id":"https:\/\/www.globo.tech\/learning-center\/install-zabbix-monitoring-server-centos-7\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.globo.tech\/learning-center\/install-zabbix-monitoring-server-centos-7\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.globo.tech\/learning-center\/install-zabbix-monitoring-server-centos-7\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.globo.tech\/learning-center\/"},{"@type":"ListItem","position":2,"name":"How to install Zabbix monitoring server on CentOS 7"}]},{"@type":"WebSite","@id":"https:\/\/www.globo.tech\/learning-center\/#website","url":"https:\/\/www.globo.tech\/learning-center\/","name":"Globo.Tech","description":"Welcome to the Official Globo.Tech Learning Center","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.globo.tech\/learning-center\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87","name":"GloboTech Communications","sameAs":["http:\/\/www.gtcomm.net"]}]}},"_links":{"self":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/2472","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/comments?post=2472"}],"version-history":[{"count":7,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/2472\/revisions"}],"predecessor-version":[{"id":3989,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/2472\/revisions\/3989"}],"wp:attachment":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/media?parent=2472"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/categories?post=2472"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/tags?post=2472"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}