{"id":14332,"date":"2016-12-09T10:12:57","date_gmt":"2016-12-09T02:12:57","guid":{"rendered":"http:\/\/blog.pmail.idv.tw\/?p=14332"},"modified":"2016-12-09T10:12:57","modified_gmt":"2016-12-09T02:12:57","slug":"centos-7-%e5%ae%89%e8%a3%9dzabbix-3-2","status":"publish","type":"post","link":"https:\/\/blog.pmail.idv.tw\/?p=14332","title":{"rendered":"CentOS 7 \u5b89\u88ddZabbix 3.2"},"content":{"rendered":"<p>\u5617\u8a66\u7814\u7a76\u4e00\u4e0b\u5728CentOS 7 zabbix \u5982\u4f55\u5b89\u88dd<\/p>\n<p><!--more--><\/p>\n<p>\u5148\u505a\u4e00\u6b21\u7cfb\u7d71updatea =&gt; yum update<\/p>\n<p>yum install epel-release<\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-1.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"za-1\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"za-1\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-1_thumb.jpg\" width=\"465\" height=\"484\"><\/a><\/p>\n<p>rpm -ivh <a href=\"https:\/\/repo.zabbix.com\/zabbix\/3.2\/rhel\/7\/x86_64\/zabbix-release-3.2-1.el7.noarch.rpm\">https:\/\/repo.zabbix.com\/zabbix\/3.2\/rhel\/7\/x86_64\/zabbix-release-3.2-1.el7.noarch.rpm<\/a><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-2.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"za-2\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"za-2\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-2_thumb.jpg\" width=\"644\" height=\"167\"><\/a><\/p>\n<p>Install Zabbix Server, Database, Web Server and PHP packages<\/p>\n<p>\u6307\u4ee4\u5982\u4e0b<\/p>\n<p>yum -y install zabbix-server-mysql zabbix-web-mysql mysql mariadb-server httpd php<\/p>\n<p>\u8cc7\u6599\u5eab\u57fa\u672c\u8a2d\u5b9a:<\/p>\n<p>\u555f\u52d5\u8cc7\u6599\u5eab\u6307\u4ee4 =&gt; systemctl start mariadb<br \/>\u8a2d\u5b9a\u91cd\u958b\u6a5f\u81ea\u52d5\u555f\u52d5 =&gt; systemctl enable mariadb<\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-3.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"za-3\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"za-3\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-3_thumb.jpg\" width=\"644\" height=\"139\"><\/a><\/p>\n<p>\u57fa\u672c\u8cc7\u6599\u5eab\u8a2d\u5b9a<\/p>\n<p>\u6703\u8a2d\u5b9aroot\u5bc6\u78bc\uff0c\u662f\u5426\u5141\u8a31root\u9060\u7aef\u767b\u5165\uff0c\u79fb\u9664test\u8cc7\u6599\u5eab\u7b49\u7b49\u8a2d\u5b9a<\/p>\n<p>\u6307\u4ee4: mysql_secure_installation<\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-4.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"za-4\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"za-4\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-4_thumb.jpg\" width=\"333\" height=\"484\"><\/a><\/p>\n<p>\u5efa\u7acb\u8cc7\u6599\u5eab\u53ca\u8cc7\u6599\u5eab\u4f7f\u8005\u5e33\u865f\u4e26\u8ce6\u4e88\u6b0a\u9650<\/p>\n<p>create database zabbix_db<br \/>grant all privileges on zabbix_db.* to zabbix_user@localhost identified by &#8220;password&#8221;<br \/>flush privileges;<\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-5.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"za-5\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"za-5\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-5_thumb.jpg\" width=\"644\" height=\"276\"><\/a><\/p>\n<p>Now import the database Schema<\/p>\n<p>cd \/usr\/share\/doc\/zabbix-server-mysql-3.2.1\/<\/p>\n<p>gunzip create.sql.gz<\/p>\n<p>mysql -u root -p zabbix_db &lt; create.sql<\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-6.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"za-6\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"za-6\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-6_thumb.jpg\" width=\"644\" height=\"209\"><\/a><\/p>\n<p>\u7de8\u8f2fzabbix \u8a2d\u5b9a\u6a94<\/p>\n<p>vi \/etc\/zabbix\/zabbix_server.conf<\/p>\n<p>\u4fee\u6539\u4ee5\u4e0b\u56db\u500b\u8a2d\u5b9a\u5f8c\u5b58\u6a94<\/p>\n<p>DBHost=localhost<br \/>DBName=zabbix_db<br \/>DBUser=zabbix_user<br \/>DBPassword=password<\/p>\n<p>\u4fee\u6539php.ini<\/p>\n<p>max_execution_time = 600<br \/>max_input_time = 600<br \/>memory_limit = 256M<br \/>post_max_size = 32M<br \/>upload_max_filesize = 16M<br \/>date.timezone = Asia\/Taipei<\/p>\n<p>\u8a2d\u5b9a\u555f\u52d5 zabbix server and web server<\/p>\n<p>systemctl start zabbix-server<br \/>systemctl enable zabbix-server<\/p>\n<p>systemctl start httpd<br \/>systemctl enable httpd<\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-7.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"za-7\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"za-7\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-7_thumb.jpg\" width=\"644\" height=\"156\"><\/a><\/p>\n<p>\u63a5\u8457\u5229\u7528\u700f\u89bd\u5668\u8f38\u5165\u7db2\u5740 <a title=\"http:\/\/192.168.0.2\/zabbix\" href=\"http:\/\/192.168.0.2\/zabbix\">http:\/\/192.168.0.2\/zabbix<\/a><\/p>\n<p>\u5c31\u6703\u770b\u5230zabbix 3.2 \u9996\u9801\uff0c\u9ede\u9078 Next <\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-8.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"za-8\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"za-8\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-8_thumb.jpg\" width=\"644\" height=\"338\"><\/a><\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-9.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"za-9\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"za-9\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-9_thumb.jpg\" width=\"644\" height=\"383\"><\/a><\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-10.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"za-10\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"za-10\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-10_thumb.jpg\" width=\"644\" height=\"384\"><\/a><\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-11.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"za-11\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"za-11\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-11_thumb.jpg\" width=\"644\" height=\"382\"><\/a><\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-12.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"za-12\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"za-12\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-12_thumb.jpg\" width=\"644\" height=\"382\"><\/a><\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-13.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"za-13\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"za-13\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-13_thumb.jpg\" width=\"644\" height=\"388\"><\/a><\/p>\n<p>\u9810\u8a2d\u767b\u5165\u5e33\u865f\u5bc6\u78bc admin\/zabbix<\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-14.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"za-14\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"za-14\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-14_thumb.jpg\" width=\"446\" height=\"484\"><\/a><\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-15.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"za-15\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"za-15\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2016\/12\/za-15_thumb.jpg\" width=\"420\" height=\"484\"><\/a><\/p>\n<p>\u767b\u5165\u5f8c\u5982\u679c\u4e00\u76f4\u51fa\u73fe:<\/p>\n<p><strong>Zabbix server is not running: the information displayed may not be current\u201d<\/strong><\/p>\n<p>\u6211\u662f\u76f4\u63a5\u628aselinux \u95dc\u6389 <\/p>\n<p>\u4fee\u6539\/etc\/selinux\/config&nbsp; \u76f4\u63a5disabled<\/p>\n<p>\u6216\u662f\u8a2d\u5b9a setsebool -P httpd_can_connect_zabbix=1<\/p>\n<div class=\"21cd169d3c0f71e95b84db320302cb4a\" data-index=\"1\" style=\"float: right; margin:10px 0 10px 10px;\">\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-8711325745898650\"\r\n     crossorigin=\"anonymous\"><\/script>\n<\/div>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>\u5617\u8a66\u7814\u7a76\u4e00\u4e0b\u5728CentOS 7 zabbix \u5982\u4f55\u5b89\u88dd<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[8,143],"tags":[],"class_list":["post-14332","post","type-post","status-publish","format-standard","hentry","category-linux","category-za"],"_links":{"self":[{"href":"https:\/\/blog.pmail.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/14332","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.pmail.idv.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.pmail.idv.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.pmail.idv.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.pmail.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14332"}],"version-history":[{"count":0,"href":"https:\/\/blog.pmail.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/14332\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.pmail.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14332"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.pmail.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14332"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.pmail.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14332"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}