{"id":4611,"date":"2019-05-11T18:23:52","date_gmt":"2019-05-11T16:23:52","guid":{"rendered":"https:\/\/nil.uniza.sk\/?p=4611"},"modified":"2019-06-07T12:35:45","modified_gmt":"2019-06-07T10:35:45","slug":"installation-of-zabbix-4-0","status":"publish","type":"post","link":"https:\/\/nil.uniza.sk\/en\/installation-of-zabbix-4-0\/","title":{"rendered":"Installation of Zabbix 4.0"},"content":{"rendered":"<h1 class=\"wp-block-heading\">Installation of Zabbix 4.0<\/h1>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Author<\/strong>: Miroslav Koh\u00fatik<\/li><li><strong>Operating system<\/strong> : Ubuntu 16.04<\/li><\/ul>\n\n\n\n<p>This guide describes the individual steps of the installation process of Zabbix version 4.0 on Ubuntu 16.04 operating system.<\/p>\n\n\n\n<p>Zabbix is a free open-source monitoring software. Zabbix provides monitoring of many metrics about the state of the administered network and its devices and services (including virtual machines).<\/p>\n\n\n\n<p>Zabbix utilizes the services of Apache web server, SQL database (in our case MySQL) and the PHP language to display web interface.<br> Before installation of Zabbix itself, install the aforementioned components first.<\/p>\n\n\n\n<p>Update the list of available APT packages and install the apache server, MySQL server, PHP language and its necessary components. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get update\nsudo apt-get install apache2 libapache2-mod-php\nsudo apt-get install mysql-server\nsudo apt-get install php php-mbstring php-gd php-xml php-bcmath php-ldap php-mysql<\/code><\/pre>\n\n\n\n<p>Now you need to manually set the time zone in PHP configuration file located at <em>\/etc\/php\/PHP_VERSION\/apache2\/php.ini.<\/em> Search for the section <strong>[Date]<\/strong> and set the parameter <strong>date.timezone<\/strong> to the timezone you are located in. The list of supported timezones can be found <a href=\"https:\/\/www.php.net\/manual\/en\/timezones.php\">here<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/HCzE2Ey.png\" alt=\"timezone settings in php.ini\" \/><\/figure>\n\n\n\n<p>Download and install the APT repository configuration package and update the APT package list once again. We have used the Ubuntu 16.04 operating system, for Ubuntu 14.04 installation substitute &#8222;xenial&#8220; with &#8222;trusty&#8220;, for Ubuntu 18.04 installation substitute &#8222;xenial&#8220; with &#8222;bionic&#8220;.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget https:\/\/repo.zabbix.com\/zabbix\/4.0\/ubuntu\/pool\/main\/z\/zabbix-release\/zabbix-release_4.0-2+xenial_all.deb\nsudo dpkg -i zabbix-release_4.0-2+xenial_all.deb\nsudo apt-get update<\/code><\/pre>\n\n\n\n<p>Install the central component Zabbix server and Zabbix front-end on the machine where you want to collect the monitoring data.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get install zabbix-server-mysql\nsudo apt-get install zabbix-frontend-php<\/code><\/pre>\n\n\n\n<p>Create the MySQL database and a Zabbix user. The first command opens the MySQL command line interface, the rest are MySQL commands.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u root -p\ncreate database zabbix character set utf8 collate utf8_bin;\ngrant all privileges on zabbix.* to zabbix@localhost identified by '&lt;password&gt;';\nquit;<\/code><\/pre>\n\n\n\n<p>Import the initial data to the database:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>zcat \/usr\/share\/doc\/zabbix-server-mysql\/create.sql.gz | mysql - uzabbix -p zabbix<\/code><\/pre>\n\n\n\n<p>Open the Zabbix server configuration file and append the following lines. Replace the &lt; password &gt; with the password you have created for MySQL.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nano \/etc\/zabbix\/zabbix_server.conf\n    DBHost=localhost\n    DBName=zabbix\n    DBUser=zabbix\n    DBPassword=&lt;password&gt;<\/code><\/pre>\n\n\n\n<p>Start the Zabbix server<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl start zabbix-server.service<\/code><\/pre>\n\n\n\n<p>Use the following command to run Zabbix on startup<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>update-rc.d zabbix-server enable<\/code><\/pre>\n\n\n\n<p>Restart the Apache web server<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl restart apache2.service<\/code><\/pre>\n\n\n\n<p>Now you should be able to access the Zabbix web interface on <em>http:\/\/IP_ADDRESS_OF_INTERFACE\/zabbix\/<\/em>.<\/p>\n\n\n\n<p>Install and run the Zabbix agent on the machine you want to monitor<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get install zabbix-agent\nsudo systemctl start zabbix-agent.service<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Source:<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/www.zabbix.com\/documentation\/4.0\/manual\/installation\/install_from_packages\/debian_ubuntu\">Installation from packages<\/a> &#8211;  Zabbix documentation<\/li><\/ul>","protected":false},"excerpt":{"rendered":"<p>Installation of Zabbix 4.0 Author: Miroslav Koh\u00fatik Operating system : Ubuntu 16.04 This guide describes the individual steps of the installation process of Zabbix version 4.0 on Ubuntu 16.04 operating system. Zabbix is a free open-source monitoring software. Zabbix provides monitoring of many metrics about the state of the administered network and its devices and&#8230;<\/p>","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[687,699],"tags":[1031],"class_list":["post-4611","post","type-post","status-publish","format-standard","hentry","category-monitoring-management-measurement","category-mmm-tools","tag-monitoring"],"taxonomy_info":{"category":[{"value":687,"label":"Monitoring, Management, Measurement"},{"value":699,"label":"Tools"}],"post_tag":[{"value":1031,"label":"monitoring"}]},"featured_image_src_large":false,"author_info":{"display_name":"Miroslav Koh\u00fatik","author_link":"https:\/\/nil.uniza.sk\/en\/author\/miroslav-kohutik\/"},"comment_info":1,"category_info":[{"term_id":687,"name":"Monitoring, Management, Measurement","slug":"monitoring-management-measurement","term_group":0,"term_taxonomy_id":685,"taxonomy":"category","description":"","parent":0,"count":5,"filter":"raw","cat_ID":687,"category_count":5,"category_description":"","cat_name":"Monitoring, Management, Measurement","category_nicename":"monitoring-management-measurement","category_parent":0},{"term_id":699,"name":"Tools","slug":"mmm-tools","term_group":0,"term_taxonomy_id":697,"taxonomy":"category","description":"","parent":687,"count":6,"filter":"raw","cat_ID":699,"category_count":6,"category_description":"","cat_name":"Tools","category_nicename":"mmm-tools","category_parent":687}],"tag_info":[{"term_id":1031,"name":"monitoring","slug":"monitoring","term_group":0,"term_taxonomy_id":1029,"taxonomy":"post_tag","description":"","parent":0,"count":6,"filter":"raw"}],"_links":{"self":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/4611","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/comments?post=4611"}],"version-history":[{"count":0,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/4611\/revisions"}],"wp:attachment":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/media?parent=4611"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/categories?post=4611"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/tags?post=4611"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}