{"id":1409,"date":"2020-10-12T09:39:55","date_gmt":"2020-10-12T01:39:55","guid":{"rendered":"https:\/\/blog.lblneva.com\/?p=1409"},"modified":"2020-10-12T09:39:55","modified_gmt":"2020-10-12T01:39:55","slug":"%e5%9f%ba%e4%ba%8ednf%e7%9a%84zabbix%e5%ae%89%e8%a3%85%ef%bc%88rhel8%ef%bc%89","status":"publish","type":"post","link":"https:\/\/blog.lblneva.com\/?p=1409","title":{"rendered":"\u57fa\u4e8eDNF\u7684zabbix\u5b89\u88c5\uff08RHEL8\uff09"},"content":{"rendered":"<h1>\u4e00\u4e9b\u5e9f\u8bdd<\/h1>\n<p>\u6700\u8fd1\u61d2\u4e86\u597d\u591a\u3002\u8003\u8fc7IE\u540e\u76f4\u63a5\u653e\u677e\u3002blog\u53c8\u5f00\u59cb\u9e3d\u4e86\u3002\u771f\u662f\u7cdf\u7cd5\u3002\u5c06\u624b\u5934\u6700\u8fd1\u505a\u7684\u7684\u4e00\u4e9b\u4e1c\u897f\u6574\u7406\u4e0b\uff0cblog\u6162\u6162\u6062\u590d\u66f4\u65b0\uff0c\u8981\u575a\u6301\u5230\u4eca\u5e74\u5e73\u5747\u4e00\u6708\u4e00\u7bc7\uff01<\/p>\n<h1>\u672c\u6587\u7531\u6765<\/h1>\n<p>\u7a81\u7136\u8981\u6c42\u5c06zabbix\u3002\u770b\u4e86\u4e0b\u6700\u65b0\u7248\u672c\u662f5.02.\u57fa\u4e8eRHEL8\u3002\u60f3\u60f3\u5408\u4f5c\u5b66\u6821\u90a3\u4e0d\u53ef\u80fd\u9700\u8981\u8054\u7f51\uff0c\u6e90\u4ee3\u7801\u5b89\u88c5\u65b9\u5f0f\u5b66\u751f\u63a5\u6536\u7a0b\u5ea6\u53c8\u6709\u4e9b\u7cdf\u7cd5\u3002\u6240\u4ee5\u51b3\u5b9a\u4f5c\u4e3a\u4ee5DNF\u65b9\u5f0f\u5b89\u88c5\u7684\u7c7b\u578b\u3002 \u5927\u4f53\u601d\u8def\u8f83\u4e3a\u7b80\u5355 \u9996\u5148\u51c6\u5907\u597drepo\u6e90\uff08\u81ea\u884c\u505a\u4e2a\u540c\u6b65\u5373\u53ef\uff09\u3002\u7136\u540e\u5c06RHEL8\u7684\u955c\u50cf\u4e0e\u5176\u4f5c\u4e3a\u4e00\u4e2a\u4ed3\u5e93\u901a\u8fc7ftp\u63d0\u4f9b\u5b66\u751f\u3002\u6700\u5927\u5316\u7b80\u5316\u6b65\u9aa4\u3002 <\/p>\n<h1>\u603b\u7ed3\u6b65\u9aa4\uff1a<\/h1>\n<ul>\n<li>\n<p>\u5b89\u88c5LAMP\u73af\u5883<\/p>\n<\/li>\n<li>\n<p>\u914d\u7f6e\u6570\u636e\u5e93\uff0c\u4f7f\u80fd\u6570\u636e\u5e93<\/p>\n<\/li>\n<li>\n<p>\u914d\u7f6e\u6e90<\/p>\n<ul>\n<li>\n<p>\u7aef\u521b\u5efazabbix\u6e90\uff08zabbixrepo.iso,\u4e3a\u6211\u81ea\u5236\uff0c\u540c\u6b65\u5b98\u7f515.0-2\u7248\u672c\uff09<\/p>\n<\/li>\n<li>\n<p>\u5b66\u751f\u4e0b\u8f7drepo\u6587\u4ef6\uff0c\u6216\u8005\u81ea\u884c\u7f16\u5236repo\u6587\u4ef6<\/p>\n<\/li>\n<li>\n<pre><code class=\"language-undefined\">cat \/etc\/yum.repos.d\/zabbix.repo\n[zabbix]\nname=Zabbix Official Repository - $basearch\nbaseurl=ftp:\/\/\u6559\u5e08repo\u6e90IP\u5730\u5740\/zabbix\/\nenabled=1\ngpgcheck=0\n\n[zabbix-non-supported]\nname=Zabbix Official Repository non-supported - $basearch\nbaseurl=ftp:\/\/\u6559\u5e08repo\u6e90IP\u5730\u5740\/zabbix-non-supported\nenabled=1\ngpgcheck=0<\/code><\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u5b89\u88c5zabbix Server\uff0cweb FD\uff0cagent<\/p>\n<ul>\n<li>\n<pre><code># dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-agent <\/code><\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u521b\u5efa\u521d\u59cb\u6570\u636e\u5e93,\u53ef\u4ee5\u81ea\u884c\u6307\u5b9a\u91cc\u9762\u7684\u7528\u6237\u540d\u548c\u5bc6\u7801\uff0c\u8fd9\u91cc\u4ee5zabbix\/password\u4e3a\u4f8b<\/p>\n<ul>\n<li>\n<pre><code># mysql -uroot -p \npassword \nmysql> create database zabbix character set utf8 collate utf8_bin;\nmysql> create user zabbix@localhost identified by 'password'; \nmysql> grant all privileges on zabbix.* to zabbix@localhost; \nmysql> quit; <\/code><\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u5bfc\u5165\u521d\u59cb\u67b6\u6784\u548c\u6570\u636e<\/p>\n<ul>\n<li>\n<pre><code># zcat \/usr\/share\/doc\/zabbix-server-mysql*\/create.sql.gz | mysql -uzabbix -p zabbix <\/code><\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u4fee\u6539\u914d\u7f6e\u6587\u4ef6<\/p>\n<ul>\n<li>\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6\/etc\/zabbix\/zabbix_server.conf                                                <\/li>\n<\/ul>\n<pre><code>DBPassword=password<\/code><\/pre>\n<ul>\n<li>\u4fee\u6539zabbix\u65f6\u533a\/etc\/php-fpm.d\/zabbix.conf<\/li>\n<\/ul>\n<pre><code>php_value[date.timezone] = Asia\/Shanghai<\/code><\/pre>\n<\/li>\n<li>\n<p>\u542f\u52a8\u670d\u52a1<\/p>\n<pre><code># systemctl restart zabbix-server zabbix-agent httpd php-fpm\n# systemctl enable zabbix-server zabbix-agent httpd php-fpm <\/code><\/pre>\n<\/li>\n<li>\n<p>\u914d\u7f6e\u524d\u7aef<\/p>\n<ul>\n<li>\n<p>\u767b\u9646\u5230zabbix\u9875\u9762\u914d\u7f6e<\/p>\n<\/li>\n<li>\n<p><a href=\"http:\/\/\u670d\u52a1\u5668IP\u5730\u5740\/zabbix\">http:\/\/\u670d\u52a1\u5668IP\u5730\u5740\/zabbix<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u4e2d\u6587\u4e71\u7801\u95ee\u9898<\/p>\n<ul>\n<li>\n<p>zabbix 5.0.2\u9ed8\u8ba4\u81ea\u5e26\u5236\u8868\u5b57\u4f53\u6587\u4ef6\uff0c\u5b57\u4f53\u6587\u4ef6\u4e0d\u652f\u6301\u4e2d\u6587\u3002\u53ef\u4ee5\u901a\u8fc7\u5c06\u8be5\u5b57\u4f53\u6587\u4ef6\u66ff\u6362\u652f\u6301\u4e2d\u6587\u7684\u5b57\u4f53\u6587\u4ef6\u65b9\u5f0f\u6765\u4f7f\u56fe\u8868\u4e71\u7801\u6b63\u5e38\u663e\u793a\u3002<\/p>\n<\/li>\n<li>\n<p>zabbix\u9ed8\u8ba4\u7684\u5236\u8868\u5b57\u4f53\u6587\u4ef6\u8def\u5f84\u4e3a\uff1a<\/p>\n<ul>\n<li>\/usr\/share\/zabbix\/assets\/fonts\/graphfont.ttf<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u66ff\u6362\u5b57\u4f53\u6587\u4ef6<\/p>\n<\/li>\n<li>\n<p>\u590d\u5236\u5b57\u4f53\u6587\u4ef6\u5230Linux\uff08\u5efa\u8bae\u4e3attf\uff09<\/p>\n<ul>\n<li>\u8fd9\u91cc\u901a\u8fc7ftp\u65b9\u5f0f\u590d\u5236\u8fdb\u5165\uff0c\u540d\u5b57\u662f1.ttf<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u5c06\u8be5\u5b57\u4f53\u8986\u76d6\u9ed8\u8ba4\u5236\u8868\u5b57\u4f53<\/p>\n<ul>\n<li>\n<pre><code>mv 1.ttf \/usr\/share\/zabbix\/assets\/fonts\/graphfont.ttf\nmv\uff1a\u662f\u5426\u8986\u76d6'\/usr\/share\/zabbix\/assets\/fonts\/graphfont.ttf'\uff1f y<\/code><\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u4e71\u7801\u9875\u9762\u5237\u65b0\uff0c\u53ef\u4ee5\u6b63\u5e38\u663e\u793a\u6587\u5b57<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u4e9b\u5e9f\u8bdd \u6700\u8fd1\u61d2\u4e86\u597d\u591a\u3002\u8003\u8fc7IE\u540e\u76f4\u63a5\u653e\u677e\u3002blog\u53c8\u5f00\u59cb\u9e3d\u4e86\u3002\u771f\u662f\u7cdf\u7cd5\u3002\u5c06\u624b\u5934\u6700\u8fd1\u505a\u7684\u7684\u4e00\u4e9b\u4e1c\u897f\u6574\u7406\u4e0b\uff0cbl [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[19,37],"class_list":["post-1409","post","type-post","status-publish","format-standard","hentry","category-it","tag-linux","tag-zabbix"],"_links":{"self":[{"href":"https:\/\/blog.lblneva.com\/index.php?rest_route=\/wp\/v2\/posts\/1409","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.lblneva.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.lblneva.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.lblneva.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.lblneva.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1409"}],"version-history":[{"count":2,"href":"https:\/\/blog.lblneva.com\/index.php?rest_route=\/wp\/v2\/posts\/1409\/revisions"}],"predecessor-version":[{"id":1412,"href":"https:\/\/blog.lblneva.com\/index.php?rest_route=\/wp\/v2\/posts\/1409\/revisions\/1412"}],"wp:attachment":[{"href":"https:\/\/blog.lblneva.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1409"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.lblneva.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1409"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.lblneva.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}