{"id":618,"date":"2024-12-21T10:00:47","date_gmt":"2024-12-21T02:00:47","guid":{"rendered":"http:\/\/192.168.5.24\/?p=618"},"modified":"2025-05-28T15:10:33","modified_gmt":"2025-05-28T07:10:33","slug":"%e5%bc%80%e6%ba%90%e4%bc%81%e4%b8%9a%e7%ba%a7%e7%9b%91%e6%8e%a7zabbix%e7%9a%84%e7%bc%96%e8%af%91%e5%ae%89%e8%a3%85%e5%8f%8a%e9%85%8d%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/bigvip.dpdns.org\/?p=618","title":{"rendered":"\u5f00\u6e90\u4f01\u4e1a\u7ea7\u76d1\u63a7zabbix-4.0.25\u7684\u7f16\u8bd1\u5b89\u88c5\u53ca\u914d\u7f6e"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u4e00\u3001\u4f9d\u8d56\u53ca\u51c6\u5907\u5b89\u88c5<\/h2>\n\n\n\n<p>1\u3001\u5b89\u88c5\u901a\u7528\u4f9d\u8d56<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum -y --setopt=obsoletes=0  install gcc gcc-c++* openssl openssl-devel zlib zlib-devel pcre pcre-devel libxml2 libxml2-devel libxslt-devel  perl-devel perl-ExtUtils-Embed  gd-devel GeoIP GeoIP-devel GeoIP-data ncurses ncurses-devel libtool-ltdl-devel libjpeg-devel libpng-devel libtiff-devel fontconfig-devel freetype-devel libXpm-devel gettext-devel unixODBC-devel net-snmp-devel libcurl-devel libssh2-devel OpenIPMI OpenIPMI-devel  openldap-devel libevent libevent-devel iksemel iksemel-devel net-snmp-libs-5.7.2-49.el7.x86_64<\/code><\/pre>\n\n\n\n<p>2\u3001\u5b89\u88c5LAMP\u5e76\u542f\u52a8\u670d\u52a1<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum -y  --setopt=obsoletes=0 install httpd mariadb-server-5.5.68-1.el7  mariadb-5.5.68-1.el7  php mariadb-libs-5.5.68-1.el7.x86_64 mariadb-devel-5.5.68-1.el7\nsystemctl start httpd\nsystemctl start mariadb<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u3001\u7f16\u8bd1\u5b89\u88c5zabbix_server<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>useradd  -M -s \/sbin\/nologin zabbix\ntar zxvf zabbix-4.0.25.tar.gz\ncd zabbix-4.0.25\n\n.\/configure --prefix=\/usr\/local\/zabbix --sysconfdir=\/etc\/zabbix\/ --enable-server --enable-agent --enable-proxy --enable-ipv6 --with-mysql --with-net-snmp --with-jabber --with-libxml2 --with-unixodbc --with-ssh2 --with-libevent --with-openssl --with-ldap --with-libcurl --with-libpcre\n\nmake &amp;&amp; make install\n\n\u914d\u7f6ezabbix\u670d\u52a1\u811a\u672c\ncp  misc\/init.d\/fedora\/core\/* \/etc\/init.d\/\nvi \/etc\/init.d\/zabbix_server  \/etc\/init.d\/zabbix_agentd\n   \u628aBASEDIR=\u2026\u2026\u8fd9\u884c\u6539\u4e3a\uff1a\nBASEDIR=\/usr\/local\/zabbix\n\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014end\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\n\n\u521b\u5efamysql\u6570\u636e\u5e93\u8d26\u53f7\u5e76\u5bfc\u5165zabbix\u6570\u636e\u5e93\nmysql -u root -e \"grant all privileges on *.* to 'zabbix'@'%' identified by '123456';\"\nmysql -u root  -e \"grant all privileges on *.* to 'zabbix'@'localhost' identified by '123456';\"\nmysql -u root  -e \"flush privileges;\"\nmysql -u root  -e \"CREATE DATABASE zabbix CHARACTER SET utf8 COLLATE utf8_bin;\"\nmysql -uzabbix -p zabbix &lt; database\/mysql\/schema.sql\nmysql -uzabbix -p zabbix &lt; database\/mysql\/images.sql\nmysql -uzabbix -p zabbix &lt; database\/mysql\/data.sql\n\n\u4fee\u6539zabbix\u914d\u7f6e\u6587\u4ef6\uff1avi \/etc\/zabbix\/zabbix_server.conf\nDBName=zabbix \nDBUser=zabbix \nDBPassword=123456 \nDBSocket=\/var\/lib\/mysql\/mysql.sock \nDBPort=3306\n\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014end\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014-\u2014mkdir \/usr\/local\/zabbix\/alertscripts \/usr\/local\/zabbix\/externalscripts\nchkconfig --add zabbix_server\nchkconfig --add zabbix_agentd\nsystemctl start zabbix_server\nsystemctl start zabbix_agentd\n\n\n\u914d\u7f6ezabbix\u7684WEB\u9875\u9762\ncp -r frontends\/php \/var\/www\/html\/zabbix\nchown  apache.apache \/var\/www\/html\/zabbix -R\n\n\u5b89\u88c5php\u4f9d\u8d56\nyum -y install php-mysql php-mbstring php-pear mysql-devel php-gd php-bcmath\n\nsystemctl restart httpd\n\n\u4f7f\u7528\u6d4f\u89c8\u5668\u6253\u5f00zabbix\u670d\u52a1\u5668\u7684WEB\u9875\u9762\uff1ahttp:\/\/zabbix_server_ip\/zabbix\n\u6839\u636e\u63d0\u793a\u4fee\u6539PHP\u7684\u53c2\u6570\uff1avi \/etc\/php.ini<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"820\" height=\"577\" src=\"http:\/\/192.168.5.24\/wp-content\/uploads\/2024\/12\/image-23.png\" alt=\"\" class=\"wp-image-647\" srcset=\"https:\/\/bigvip.dpdns.org\/wp-content\/uploads\/2024\/12\/image-23.png 820w, https:\/\/bigvip.dpdns.org\/wp-content\/uploads\/2024\/12\/image-23-300x211.png 300w, https:\/\/bigvip.dpdns.org\/wp-content\/uploads\/2024\/12\/image-23-768x540.png 768w, https:\/\/bigvip.dpdns.org\/wp-content\/uploads\/2024\/12\/image-23-816x574.png 816w\" sizes=\"auto, (max-width: 820px) 100vw, 820px\" \/><\/figure>\n\n\n\n<p>\u4fee\u6539\u5b8c\u540e<strong>\u91cd\u542fhttpd\u670d\u52a1<\/strong>\u5373\u53ef\u6309\u63d0\u793a\u6b65\u9aa4\u5b8c\u6210zabbix\u670d\u52a1\u5668WEB\u9875\u9762\u7684\u90e8\u7f72\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"803\" height=\"328\" src=\"http:\/\/192.168.5.24\/wp-content\/uploads\/2024\/12\/image-24.png\" alt=\"\" class=\"wp-image-648\" srcset=\"https:\/\/bigvip.dpdns.org\/wp-content\/uploads\/2024\/12\/image-24.png 803w, https:\/\/bigvip.dpdns.org\/wp-content\/uploads\/2024\/12\/image-24-300x123.png 300w, https:\/\/bigvip.dpdns.org\/wp-content\/uploads\/2024\/12\/image-24-768x314.png 768w\" sizes=\"auto, (max-width: 803px) 100vw, 803px\" \/><\/figure>\n\n\n\n<p>\u90e8\u7f72\u5b8c\u6210\u540e\u518d\u6b21\u6253\u5f00\u9875\u9762\u9700\u8981\u8ba4\u8bc1\uff0c \u7528\u6237\u540d\uff1aAdmin \u5bc6\u7801\uff1azabbix<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"726\" height=\"459\" src=\"http:\/\/192.168.5.24\/wp-content\/uploads\/2024\/12\/image-25.png\" alt=\"\" class=\"wp-image-649\" srcset=\"https:\/\/bigvip.dpdns.org\/wp-content\/uploads\/2024\/12\/image-25.png 726w, https:\/\/bigvip.dpdns.org\/wp-content\/uploads\/2024\/12\/image-25-300x190.png 300w\" sizes=\"auto, (max-width: 726px) 100vw, 726px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e09\u3001\u6c49\u5316<\/h2>\n\n\n\n<p>1\u3001\u5148\u9009\u62e9\u7b80\u4f53\u4e2d\u6587<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"998\" height=\"509\" src=\"http:\/\/192.168.5.24\/wp-content\/uploads\/2024\/12\/image-26.png\" alt=\"\" class=\"wp-image-654\" srcset=\"https:\/\/bigvip.dpdns.org\/wp-content\/uploads\/2024\/12\/image-26.png 998w, https:\/\/bigvip.dpdns.org\/wp-content\/uploads\/2024\/12\/image-26-300x153.png 300w, https:\/\/bigvip.dpdns.org\/wp-content\/uploads\/2024\/12\/image-26-768x392.png 768w, https:\/\/bigvip.dpdns.org\/wp-content\/uploads\/2024\/12\/image-26-816x416.png 816w\" sizes=\"auto, (max-width: 998px) 100vw, 998px\" \/><\/figure>\n\n\n\n<p>2\u3001\u51b3\u56fe\u5f62\u4e2d\u6587\u4e71\u7801\u7684\u95ee\u9898<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tar zxvf ttf-arphic-ukai.tar.gz\ncp ukai.ttc \/var\/www\/html\/zabbix\/assets\/fonts\/ukai.ttf\nvi \/var\/www\/html\/zabbix\/include\/defines.inc.php\n...\ndefine('ZBX_GRAPH_FONT_NAME', 'ukai'); #\u4fee\u6539\u5b57\u4f53\u5e93\u4e3aukai\n...\nsystemctl restart zabbix_server\n\u7136\u540e\u5237\u65b0\u9875\u9762\u5c31\u53ef\u4ee5\u89e3\u51b3\u56fe\u5f62\u4e2d\u6587\u4e71\u7801\u7684\u95ee\u9898<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1025\" height=\"591\" src=\"http:\/\/192.168.5.24\/wp-content\/uploads\/2024\/12\/image-27.png\" alt=\"\" class=\"wp-image-656\" srcset=\"https:\/\/bigvip.dpdns.org\/wp-content\/uploads\/2024\/12\/image-27.png 1025w, https:\/\/bigvip.dpdns.org\/wp-content\/uploads\/2024\/12\/image-27-300x173.png 300w, https:\/\/bigvip.dpdns.org\/wp-content\/uploads\/2024\/12\/image-27-768x443.png 768w, https:\/\/bigvip.dpdns.org\/wp-content\/uploads\/2024\/12\/image-27-816x470.png 816w\" sizes=\"auto, (max-width: 1025px) 100vw, 1025px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u56db\u3001\u7f16\u8bd1\u5b89\u88c5zabbix_agent<\/h2>\n\n\n\n<p>1\u3001\u5148\u5b89\u88c5\u901a\u7528\u4f9d\u8d56<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum -y install gcc gcc-c++* openssl openssl-devel zlib zlib-devel pcre pcre-devel libxml2 libxml2-devel libxslt-devel  perl-devel perl-ExtUtils-Embed  gd-devel GeoIP GeoIP-devel GeoIP-data ncurses ncurses-devel libtool-ltdl-devel libjpeg-devel libpng-devel libtiff-devel fontconfig-devel freetype-devel libXpm-devel gettext-devel unixODBC-devel net-snmp-devel libcurl-devel libssh2-devel OpenIPMI OpenIPMI-devel  openldap-devel libevent libevent-devel iksemel iksemel-devel net-snmp-libs-5.7.2-49.el7.x86_64<\/code><\/pre>\n\n\n\n<p>2\u3001\u914d\u7f6ezabbix_agent<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>useradd  -M -s \/sbin\/nologin zabbix\ntar zxvf zabbix-4.0.25.tar.gz\ncd zabbix-4.0.25\n.\/configure --prefix=\/usr\/local\/zabbix --sysconfdir=\/etc\/zabbix_agent\/  --enable-agent<\/code><\/pre>\n\n\n\n<p>3\u3001\u7f16\u8bd1\u5b89\u88c5zabbix_agent<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>make &amp;&amp; make install<\/code><\/pre>\n\n\n\n<p>4\u3001\u5b89\u88c5zabbix_agent\u7684\u670d\u52a1\u811a\u672c<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cp  misc\/init.d\/fedora\/core\/zabbix_agentd \/etc\/init.d\/\nvi \/etc\/init.d\/zabbix_agentd\n \u628aBASEDIR=\u2026\u2026\u8fd9\u884c\u6539\u4e3a\uff1a\nBASEDIR=\/usr\/local\/zabbix\n_____________________________________________\nchkconfig --add zabbix_agentd<\/code><\/pre>\n\n\n\n<p>5\u3001\u4fee\u6539\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vi \/etc\/zabbix_agent\/zabbix_agentd.conf\n\nServer=127.0.0.1                          #zabbix\u670d\u52a1\u5668\u7684IP\nServerActive=127.0.0.1                    #zabbix\u670d\u52a1\u5668\u7684IP\nHostname=WEB server                       #\u88ab\u76d1\u63a7\u4e3b\u673a\u7684\u540d\u5b57<\/code><\/pre>\n\n\n\n<p>6\u3001\u542f\u52a8zabbix_agent<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart zabbix_agentd<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u4f9d\u8d56\u53ca\u51c6\u5907\u5b89\u88c5 1\u3001\u5b89\u88c5\u901a\u7528\u4f9d\u8d56 2\u3001\u5b89\u88c5LAMP\u5e76\u542f\u52a8\u670d\u52a1 \u4e8c\u3001\u7f16\u8bd1\u5b89\u88c5zabbix_server \u4fee\u6539 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"aside","meta":{"footnotes":""},"categories":[20,31,36,35],"tags":[25,15,26,42,94],"class_list":["post-618","post","type-post","status-publish","format-aside","hentry","category-linux","category-web","category-36","category-35","tag-lamp","tag-mysql","tag-php","tag-web","tag-zabbix","post_format-post-format-aside"],"_links":{"self":[{"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=\/wp\/v2\/posts\/618","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=618"}],"version-history":[{"count":47,"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=\/wp\/v2\/posts\/618\/revisions"}],"predecessor-version":[{"id":1219,"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=\/wp\/v2\/posts\/618\/revisions\/1219"}],"wp:attachment":[{"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=618"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=618"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=618"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}