{"id":42550,"date":"2024-10-03T17:46:32","date_gmt":"2024-10-03T09:46:32","guid":{"rendered":"https:\/\/server.hk\/cnblog\/42550\/"},"modified":"2024-10-03T17:46:32","modified_gmt":"2024-10-03T09:46:32","slug":"centos-6-5-%e4%b8%8b-zabbix-2-4-8-%e5%ae%89%e8%a3%9d%e9%85%8d%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/42550\/","title":{"rendered":"CentOS 6.5 \u4e0b Zabbix 2.4.8 \u5b89\u88dd\u914d\u7f6e"},"content":{"rendered":"<h1 id=\"centos-6-5-%e4%b8%8b-zabbix-2-4-8-%e5%ae%89%e8%a3%9d%e9%85%8d%e7%bd%ae-pxKTYnrQDj\">CentOS 6.5 \u4e0b Zabbix 2.4.8 \u5b89\u88dd\u914d\u7f6e<\/h1>\n<p>Zabbix \u662f\u4e00\u6b3e\u5f37\u5927\u7684\u958b\u6e90\u76e3\u63a7\u89e3\u6c7a\u65b9\u6848\uff0c\u80fd\u5920\u5e6b\u52a9\u7528\u6236\u76e3\u63a7\u5404\u7a2e IT \u57fa\u790e\u8a2d\u65bd\u7684\u6027\u80fd\u548c\u53ef\u7528\u6027\u3002\u672c\u6587\u5c07\u4ecb\u7d39\u5982\u4f55\u5728 CentOS 6.5 \u4e0a\u5b89\u88dd\u548c\u914d\u7f6e Zabbix 2.4.8\uff0c\u8b93\u60a8\u80fd\u5920\u6709\u6548\u5730\u76e3\u63a7\u60a8\u7684\u4f3a\u670d\u5668\u548c\u61c9\u7528\u7a0b\u5e8f\u3002<\/p>\n<h2 id=\"%e5%89%8d%e6%9c%9f%e6%ba%96%e5%82%99-pxKTYnrQDj\">\u524d\u671f\u6e96\u5099<\/h2>\n<p>\u5728\u958b\u59cb\u5b89\u88dd\u4e4b\u524d\uff0c\u8acb\u78ba\u4fdd\u60a8\u7684 CentOS 6.5 \u7cfb\u7d71\u5df2\u7d93\u66f4\u65b0\u5230\u6700\u65b0\u7248\u672c\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u4f86\u66f4\u65b0\u7cfb\u7d71\uff1a<\/p>\n<pre><code>sudo yum update<\/code><\/pre>\n<p>\u63a5\u4e0b\u4f86\uff0c\u60a8\u9700\u8981\u5b89\u88dd\u4e00\u4e9b\u5fc5\u8981\u7684\u4f9d\u8cf4\u5305\uff0c\u5305\u62ec Apache\u3001MySQL \u548c PHP\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u9032\u884c\u5b89\u88dd\uff1a<\/p>\n<pre><code>sudo yum install httpd mysql-server php php-mysql php-gd php-xml php-bcmath php-mbstring<\/code><\/pre>\n<h2 id=\"%e5%ae%89%e8%a3%9d-zabbix-2-4-8-pxKTYnrQDj\">\u5b89\u88dd Zabbix 2.4.8<\/h2>\n<p>\u9996\u5148\uff0c\u60a8\u9700\u8981\u4e0b\u8f09 Zabbix 2.4.8 \u7684\u5b89\u88dd\u5305\u3002\u53ef\u4ee5\u4f7f\u7528 wget \u547d\u4ee4\u4f86\u4e0b\u8f09\uff1a<\/p>\n<pre><code>wget http:\/\/sourceforge.net\/projects\/zabbix\/files\/ZABBIX%20Latest%20Stable\/2.4.8\/zabbix-2.4.8.tar.gz<\/code><\/pre>\n<p>\u4e0b\u8f09\u5b8c\u6210\u5f8c\uff0c\u89e3\u58d3\u7e2e\u5b89\u88dd\u5305\uff1a<\/p>\n<pre><code>tar -zxvf zabbix-2.4.8.tar.gz<\/code><\/pre>\n<p>\u63a5\u4e0b\u4f86\uff0c\u5c07\u89e3\u58d3\u7e2e\u7684\u6587\u4ef6\u79fb\u52d5\u5230 Apache \u7684\u6839\u76ee\u9304\u4e0b\uff1a<\/p>\n<pre><code>sudo mv zabbix-2.4.8 \/var\/www\/html\/zabbix<\/code><\/pre>\n<h2 id=\"%e9%85%8d%e7%bd%ae-mysql-%e6%95%b8%e6%93%9a%e5%ba%ab-pxKTYnrQDj\">\u914d\u7f6e MySQL \u6578\u64da\u5eab<\/h2>\n<p>\u5728\u5b89\u88dd Zabbix \u4e4b\u524d\uff0c\u60a8\u9700\u8981\u5275\u5efa\u4e00\u500b MySQL \u6578\u64da\u5eab\u548c\u7528\u6236\u3002\u9996\u5148\uff0c\u555f\u52d5 MySQL \u670d\u52d9\uff1a<\/p>\n<pre><code>sudo service mysqld start<\/code><\/pre>\n<p>\u7136\u5f8c\uff0c\u9032\u5165 MySQL \u547d\u4ee4\u884c\u754c\u9762\uff1a<\/p>\n<pre><code>mysql -u root -p<\/code><\/pre>\n<p>\u5728 MySQL \u4e2d\uff0c\u5275\u5efa\u4e00\u500b\u65b0\u7684\u6578\u64da\u5eab\u548c\u7528\u6236\uff1a<\/p>\n<pre><code>CREATE DATABASE zabbix CHARACTER SET utf8 COLLATE utf8_bin;\nCREATE USER 'zabbix'@'localhost' IDENTIFIED BY 'your_password';\nGRANT ALL PRIVILEGES ON zabbix.* TO 'zabbix'@'localhost';\nFLUSH PRIVILEGES;<\/code><\/pre>\n<p>\u63a5\u4e0b\u4f86\uff0c\u5c0e\u5165 Zabbix \u7684\u6578\u64da\u5eab\u7d50\u69cb\u548c\u521d\u59cb\u6578\u64da\uff1a<\/p>\n<pre><code>cd \/var\/www\/html\/zabbix\nmysql -uzabbix -p zabbix &lt; database\/schema.sql\nmysql -uzabbix -p zabbix &lt; database\/images.sql\nmysql -uzabbix -p zabbix &lt; database\/data.sql<\/code><\/pre>\n<h2 id=\"%e9%85%8d%e7%bd%ae-zabbix-pxKTYnrQDj\">\u914d\u7f6e Zabbix<\/h2>\n<p>\u63a5\u4e0b\u4f86\uff0c\u60a8\u9700\u8981\u914d\u7f6e Zabbix \u7684 PHP \u8a2d\u7f6e\u3002\u7de8\u8f2f Zabbix \u7684\u914d\u7f6e\u6587\u4ef6\uff1a<\/p>\n<pre><code>sudo nano \/var\/www\/html\/zabbix\/conf\/zabbix.conf.php<\/code><\/pre>\n<p>\u5728\u6587\u4ef6\u4e2d\uff0c\u627e\u5230\u4ee5\u4e0b\u884c\u4e26\u6839\u64da\u60a8\u7684 MySQL \u8a2d\u7f6e\u9032\u884c\u4fee\u6539\uff1a<\/p>\n<pre><code>$DB['TYPE']     = 'MYSQL';\n$DB['SERVER']   = 'localhost';\n$DB['PORT']     = '0';\n$DB['DATABASE'] = 'zabbix';\n$DB['USER']     = 'zabbix';\n$DB['PASSWORD'] = 'your_password';<\/code><\/pre>\n<h2 id=\"%e5%95%9f%e5%8b%95-apache-%e5%92%8c-zabbix-%e6%9c%8d%e5%8b%99-pxKTYnrQDj\">\u555f\u52d5 Apache \u548c Zabbix \u670d\u52d9<\/h2>\n<p>\u5b8c\u6210\u914d\u7f6e\u5f8c\uff0c\u555f\u52d5 Apache \u670d\u52d9\uff1a<\/p>\n<pre><code>sudo service httpd start<\/code><\/pre>\n<p>\u63a5\u4e0b\u4f86\uff0c\u60a8\u53ef\u4ee5\u901a\u904e\u700f\u89bd\u5668\u8a2a\u554f Zabbix \u7684\u5b89\u88dd\u754c\u9762\uff0c\u7db2\u5740\u70ba\uff1ahttp:\/\/your_server_ip\/zabbix\u3002\u6309\u7167\u754c\u9762\u4e0a\u7684\u6307\u793a\u5b8c\u6210\u5b89\u88dd\u3002<\/p>\n<h2 id=\"%e7%b8%bd%e7%b5%90-pxKTYnrQDj\">\u7e3d\u7d50<\/h2>\n<p>\u5728\u672c\u6587\u4e2d\uff0c\u6211\u5011\u4ecb\u7d39\u4e86\u5982\u4f55\u5728 CentOS 6.5 \u4e0a\u5b89\u88dd\u548c\u914d\u7f6e Zabbix 2.4.8\u3002\u9019\u500b\u904e\u7a0b\u5305\u62ec\u4e86\u7cfb\u7d71\u66f4\u65b0\u3001\u5fc5\u8981\u4f9d\u8cf4\u7684\u5b89\u88dd\u3001MySQL \u6578\u64da\u5eab\u7684\u914d\u7f6e\u4ee5\u53ca Zabbix \u7684\u5b89\u88dd\u548c\u914d\u7f6e\u3002\u901a\u904e\u9019\u4e9b\u6b65\u9a5f\uff0c\u60a8\u53ef\u4ee5\u6709\u6548\u5730\u76e3\u63a7\u60a8\u7684\u4f3a\u670d\u5668\u548c\u61c9\u7528\u7a0b\u5e8f\u3002<\/p>\n<p>\u5982\u679c\u60a8\u9700\u8981\u9032\u4e00\u6b65\u7684\u652f\u6301\u6216\u5c0b\u627e\u9ad8\u6548\u7684 <a href=\"https:\/\/server.hk\">VPS<\/a> \u89e3\u6c7a\u65b9\u6848\uff0c\u8acb\u8a2a\u554f\u6211\u5011\u7684\u7db2\u7ad9\u4ee5\u7372\u53d6\u66f4\u591a\u4fe1\u606f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to install and configure Zabbix 2.4.8 on CentOS 6.5 with step-by-step instructions for effective monitoring solutions.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4924],"tags":[],"class_list":["post-42550","post","type-post","status-publish","format-standard","hentry","category-setup-tutorials"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/42550","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=42550"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/42550\/revisions"}],"predecessor-version":[{"id":42551,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/42550\/revisions\/42551"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=42550"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=42550"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=42550"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}