{"id":19531,"date":"2017-04-25T06:14:02","date_gmt":"2017-04-24T22:14:02","guid":{"rendered":"https:\/\/2blog.ilc.edu.tw\/25793\/2017\/04\/25\/%e5%9c%a8-centos-7-x-%e4%b8%8a%e5%ae%89%e8%a3%9d-zabbix\/"},"modified":"2021-03-18T17:25:00","modified_gmt":"2021-03-18T09:25:00","slug":"%e5%9c%a8-centos-7-x-%e4%b8%8a%e5%ae%89%e8%a3%9d-zabbix","status":"publish","type":"post","link":"https:\/\/2blog.ilc.edu.tw\/25793\/2017\/04\/25\/%e5%9c%a8-centos-7-x-%e4%b8%8a%e5%ae%89%e8%a3%9d-zabbix\/","title":{"rendered":"\u5728 CentOS 7.x \u4e0a\u5b89\u88dd Zabbix"},"content":{"rendered":"<p>Zabbix \u662f\u4e00\u5957\u4f01\u696d\u7d1a\u7684\u7db2\u7ba1\u8edf\u9ad4\uff0c\u8b93\u7db2\u7ba1\u4eba\u54e1\u53ef\u4ee5\u8f15\u9b06\u5730\u5229\u7528\u7db2\u9801\u4ecb\u9762\u5373\u53ef\u5b8c\u5168\u76e3\u63a7\u76f8\u95dc\u7db2\u8def\u670d\u52d9\u4e3b\u6a5f\u7684\u73fe\u884c\u72c0\u614b\uff0c\u4e26\u4e14\u5728\u6240\u8a2d\u5b9a\u7684\u7570\u5e38\u72c0\u6cc1\u767c\u751f\u6642\uff0c\u7acb\u5373\u4ee5\u96fb\u5b50\u90f5\u4ef6\u7b49\u65b9\u6cd5\u901a\u77e5\u7db2\u7ba1\u4eba\u54e1\u3002<br \/>Zabbix \u5b98\u65b9\u7db2\u7ad9\uff1a<a href=\"http:\/\/www.zabbix.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/www.zabbix.com\/<\/a><br \/>\u53c3\u8003\u7db2\u7ad9\uff1a<br \/><a href=\"http:\/\/www.netadmin.com.tw\/article_content.aspx?sn=1404100003\" target=\"_blank\" rel=\"noopener noreferrer\">\u4f01\u696d\u7d1a\u958b\u6e90\u7db2\u7ba1\u8edf\u9ad4 \u7528Zabbix\u76e3\u63a7\u7db2\u8def\u670d\u52d9 &#8211; \u6280\u8853\u5c08\u6b04 &#8211; \u7db2\u7ba1\u4ebaNetAdmin<\/a><br \/><a href=\"http:\/\/blog.pmail.idv.tw\/?p=14332\" target=\"_blank\" rel=\"noopener noreferrer\">CentOS 7 \u5b89\u88ddZabbix 3.2 | MIS\u7684\u80cc\u5f71<\/a><br \/><a href=\"https:\/\/www.phpini.com\/linux\/rhel-centos-install-zabbix\" target=\"_blank\" rel=\"noopener noreferrer\">RHEL \/ CentOS \u5b89\u88dd\u76e3\u6e2c\u5de5\u5177 \u2014 Zabbix \u2013 Linux \u6280\u8853\u624b\u672d<\/a><br \/><a href=\"https:\/\/sufuf3.gitbooks.io\/zabbix-document\/content\/zs_install.html\" target=\"_blank\" rel=\"noopener noreferrer\">zabbix server \u5b89\u88dd | zabbix document<\/a><\/p>\n<p>1. \u9996\u5148\u5148\u5b89\u88dd\u597d LAMP<br \/># <span style=\"color: #ff0000\">yum install httpd mariadb mariadb-server php php-mysql php-gd php-pear php-xml php-xmlrpc php-mbstring php-soap<\/span>[@more@]2. \u5b89\u88dd zabbix \u5957\u4ef6\u5eab<br \/># <span style=\"color: #ff0000\">rpm -ivh http:\/\/repo.zabbix.com\/zabbix\/3.2\/rhel\/7\/x86_64\/zabbix-release-3.2-1.el7.noarch.rpm<\/span><\/p>\n<p>3. \u66f4\u65b0\u5957\u4ef6\u5eab<br \/># <span style=\"color: #ff0000\">yum update<\/span><\/p>\n<p>4.\u00a0 \u5b89\u88dd zabbix<br \/># <span style=\"color: #ff0000\">yum install zabbix-server-mysql zabbix-web-mysql zabbix-web<\/span><\/p>\n<p>5. \u8a2d\u5b9a\u958b\u6a5f\u6642\u555f\u52d5<br \/># <span style=\"color: #ff0000\">systemctl enable zabbix-server.service<\/span><br \/><span style=\"color: #0000ff\">Created symlink from \/etc\/systemd\/system\/multi-user.target.wants\/zabbix-server.service to \/usr\/lib\/systemd\/system\/zabbix-server.service.<\/span><\/p>\n<p>6. \u5efa\u7acb zabbix \u8cc7\u6599\u5eab\u4e26\u8a2d\u5b9a\u8cc7\u6599\u5eab\u7684\u7ba1\u7406\u5e33\u865f\u53ca\u5bc6\u78bc<br \/># <span style=\"color: #ff0000\">\/usr\/bin\/mysql -u root -p<\/span><br \/>&gt; <span style=\"color: #ff0000\">create databases zabbixdb;<\/span><br \/>&gt; <span style=\"color: #ff0000\">grant all privileges on zabbixdb.* to zabbix@localhost identified by &#8220;123456&#8221;;<\/span><br \/>&gt; <span style=\"color: #ff0000\">flush privileges;<\/span><\/p>\n<p>7. \u532f\u5165\u8cc7\u6599\u5eab<br \/># <span style=\"color: #ff0000\">gunzip \/usr\/share\/doc\/zabbix-server-mysql-3.2.4\/create.sql.gz<\/span><br \/># <span style=\"color: #ff0000\">\/usr\/bin\/mysql -u zabbix -p zabbixdb &lt; \/usr\/share\/doc\/zabbix-server-mysql-3.2.4\/create.sql<\/span><\/p>\n<p>8. \u4fee\u6539\u8a2d\u5b9a\u6a94 <span style=\"color: #0000ff\">\/etc\/zabbix\/zabbix_server.conf<\/span> \u53ca <span style=\"color: #0000ff\">\/etc\/php.ini<\/span><br \/># <span style=\"color: #ff0000\">cp \/etc\/zabbix\/zabbix_server.conf \/etc\/zabbix\/zabbix_server.conf.$(date +%F)<\/span><br \/># <span style=\"color: #ff0000\">sed -i &#8216;s\/DBName=zabbix\/DBName=zabbixdb\/&#8217; \/etc\/zabbix\/zabbix_server.conf<\/span><br \/># <span style=\"color: #ff0000\">sed -i &#8216;s\/# DBPassword=\/DBPassword=123456\/&#8217; \/etc\/zabbix\/zabbix_server.conf<\/span><br \/># <span style=\"color: #ff0000\">sed -i &#8216;s\/;date.timezone =\/date.timezone = Asia\/Taipei\/&#8217; \/etc\/php.ini<\/span><\/p>\n<p># <span style=\"color: #ff0000\">vim \/etc\/httpd\/conf.d\/zabbix.conf<\/span><br \/>\u628a<br \/><span style=\"color: #0000ff\"># php_value date.timezone Europe\/Riga<\/span><br \/>\u4fee\u6539\u6210<br \/><span style=\"color: #ff0000\">php_value date.timezone Asia\/Taipei<\/span><\/p>\n<p>9. \u91cd\u65b0\u555f\u52d5 Web Server<br \/># <span style=\"color: #ff0000\">systemctl restart httpd.service<\/span><\/p>\n<p>10. \u555f\u52d5 Zabbix Server<br \/># <span style=\"color: #ff0000\">systemctl start zabbix-server.service<\/span><\/p>\n<p>11. \u9032\u884c\u5b89\u88dd\u53ca\u8a2d\u5b9a http:\/\/Server&#8217;IP\/zabbix<br \/><a id=\"res_3786494\" href=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/25793-3786494.png\"><img decoding=\"async\" src=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/previews-med\/25793-3786494.png\" border=\"0\" alt=\"\" \/><\/a><\/p>\n<p><a id=\"res_3786493\" href=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/25793-3786493.png\"><img decoding=\"async\" src=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/previews-med\/25793-3786493.png\" border=\"0\" alt=\"\" \/><\/a><\/p>\n<p><a id=\"res_3786492\" href=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/25793-3786492.png\"><img decoding=\"async\" src=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/previews-med\/25793-3786492.png\" border=\"0\" alt=\"\" \/><\/a><\/p>\n<p><a id=\"res_3786491\" href=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/25793-3786491.png\"><img decoding=\"async\" src=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/previews-med\/25793-3786491.png\" border=\"0\" alt=\"\" \/><\/a><\/p>\n<p><a id=\"res_3786490\" href=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/25793-3786490.png\"><img decoding=\"async\" src=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/previews-med\/25793-3786490.png\" border=\"0\" alt=\"\" \/><\/a><\/p>\n<p><a id=\"res_3786489\" href=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/25793-3786489.png\"><img decoding=\"async\" src=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/previews-med\/25793-3786489.png\" border=\"0\" alt=\"\" \/><\/a><\/p>\n<p>\u9810\u8a2d\u767b\u5165\u7684\u5e33\u865f\u53ca\u5bc6\u78bc\uff1a<span style=\"color: #ff0000\">admin<\/span> \/ <span style=\"color: #ff0000\">zabbix<\/span><br \/><a id=\"res_3786488\" href=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/25793-3786488.png\"><img decoding=\"async\" src=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/previews-med\/25793-3786488.png\" border=\"0\" alt=\"\" \/><\/a><\/p>\n<p>\u767b\u5165\u756b\u9762<br \/><a id=\"res_3786495\" href=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/25793-3786495.png\"><img decoding=\"async\" src=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/previews-med\/25793-3786495.png\" border=\"0\" alt=\"\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Zabbix \u662f\u4e00\u5957\u4f01\u696d\u7d1a\u7684\u7db2\u7ba1\u8edf\u9ad4\uff0c\u8b93\u7db2\u7ba1\u4eba\u54e1\u53ef\u4ee5\u8f15\u9b06\u5730\u5229\u7528\u7db2\u9801\u4ecb\u9762\u5373\u53ef\u5b8c\u5168\u76e3\u63a7\u76f8\u95dc\u7db2\u8def\u670d\u52d9\u4e3b\u6a5f\u7684\u73fe\u884c\u72c0\u614b\uff0c &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/2blog.ilc.edu.tw\/25793\/2017\/04\/25\/%e5%9c%a8-centos-7-x-%e4%b8%8a%e5%ae%89%e8%a3%9d-zabbix\/\" class=\"more-link\">\u95b1\u8b80\u5168\u6587<span class=\"screen-reader-text\">\u3008\u5728 CentOS 7.x \u4e0a\u5b89\u88dd Zabbix\u3009<\/span><\/a><\/p>\n","protected":false},"author":55,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[117,199],"tags":[],"class_list":["post-19531","post","type-post","status-publish","format-standard","hentry","category-c-78462","category-c-105255"],"meta_key":{"_pingme":["1"],"_encloseme":["1"],"lt_post_id":["687728"]},"_links":{"self":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/19531"}],"collection":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/comments?post=19531"}],"version-history":[{"count":1,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/19531\/revisions"}],"predecessor-version":[{"id":21043,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/19531\/revisions\/21043"}],"wp:attachment":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/media?parent=19531"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/categories?post=19531"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/tags?post=19531"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}