{"id":44172,"date":"2024-10-06T13:29:14","date_gmt":"2024-10-06T05:29:14","guid":{"rendered":"https:\/\/server.hk\/cnblog\/44172\/"},"modified":"2024-10-06T13:29:14","modified_gmt":"2024-10-06T05:29:14","slug":"centos-%e4%b8%8b-zabbix-2-2-%e5%8d%87%e7%b4%9a%e5%88%b0-zabbix-3-0-2","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/44172\/","title":{"rendered":"CentOS \u4e0b Zabbix 2.2 \u5347\u7d1a\u5230 Zabbix 3.0.2"},"content":{"rendered":"<h1 id=\"centos-%e4%b8%8b-zabbix-2-2-%e5%8d%87%e7%b4%9a%e5%88%b0-zabbix-3-0-2-AuGfAgLwTj\">CentOS \u4e0b Zabbix 2.2 \u5347\u7d1a\u5230 Zabbix 3.0.2<\/h1>\n<p>Zabbix \u662f\u4e00\u6b3e\u5f37\u5927\u7684\u958b\u6e90\u76e3\u63a7\u89e3\u6c7a\u65b9\u6848\uff0c\u5ee3\u6cdb\u61c9\u7528\u65bc\u4f3a\u670d\u5668\u3001\u7db2\u7d61\u8a2d\u5099\u53ca\u61c9\u7528\u7a0b\u5e8f\u7684\u76e3\u63a7\u3002\u96a8\u8457\u7248\u672c\u7684\u66f4\u65b0\uff0cZabbix \u4e0d\u65b7\u5f15\u5165\u65b0\u529f\u80fd\u548c\u6539\u9032\uff0c\u9019\u4f7f\u5f97\u5b9a\u671f\u5347\u7d1a\u6210\u70ba\u5fc5\u8981\u3002\u672c\u6587\u5c07\u4ecb\u7d39\u5982\u4f55\u5728 CentOS \u7cfb\u7d71\u4e0a\u5c07 Zabbix 2.2 \u5347\u7d1a\u5230 Zabbix 3.0.2 \u7684\u904e\u7a0b\u3002<\/p>\n<h2 id=\"%e5%8d%87%e7%b4%9a%e5%89%8d%e7%9a%84%e6%ba%96%e5%82%99-AuGfAgLwTj\">\u5347\u7d1a\u524d\u7684\u6e96\u5099<\/h2>\n<p>\u5728\u9032\u884c\u5347\u7d1a\u4e4b\u524d\uff0c\u5efa\u8b70\u60a8\u5148\u505a\u597d\u4ee5\u4e0b\u6e96\u5099\u5de5\u4f5c\uff1a<\/p>\n<ul>\n<li>\u5099\u4efd\u7576\u524d\u7684 Zabbix \u6578\u64da\u5eab\u548c\u914d\u7f6e\u6587\u4ef6\u3002<\/li>\n<li>\u6aa2\u67e5\u7cfb\u7d71\u7684\u517c\u5bb9\u6027\uff0c\u78ba\u4fdd CentOS \u7248\u672c\u652f\u6301 Zabbix 3.0.2\u3002<\/li>\n<li>\u78ba\u4fdd\u7cfb\u7d71\u5df2\u5b89\u88dd\u5fc5\u8981\u7684\u4f9d\u8cf4\u5305\u3002<\/li>\n<\/ul>\n<h3 id=\"%e5%82%99%e4%bb%bd%e6%95%b8%e6%93%9a%e5%ba%ab-AuGfAgLwTj\">\u5099\u4efd\u6578\u64da\u5eab<\/h3>\n<p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5099\u4efd Zabbix \u6578\u64da\u5eab\uff1a<\/p>\n<pre><code>mysqldump -u [username] -p zabbix &gt; zabbix_backup.sql<\/code><\/pre>\n<p>\u8acb\u5c07 [username] \u66ff\u63db\u70ba\u60a8\u7684\u6578\u64da\u5eab\u7528\u6236\u540d\u3002\u9019\u6a23\u53ef\u4ee5\u78ba\u4fdd\u5728\u5347\u7d1a\u904e\u7a0b\u4e2d\u51fa\u73fe\u554f\u984c\u6642\uff0c\u60a8\u53ef\u4ee5\u6062\u5fa9\u6578\u64da\u3002<\/p>\n<h2 id=\"%e5%8d%87%e7%b4%9a%e6%ad%a5%e9%a9%9f-AuGfAgLwTj\">\u5347\u7d1a\u6b65\u9a5f<\/h2>\n<h3 id=\"1-%e4%b8%8b%e8%bc%89-zabbix-3-0-2-AuGfAgLwTj\">1. \u4e0b\u8f09 Zabbix 3.0.2<\/h3>\n<p>\u9996\u5148\uff0c\u60a8\u9700\u8981\u5f9e Zabbix \u5b98\u65b9\u7db2\u7ad9\u4e0b\u8f09 Zabbix 3.0.2 \u7684\u5b89\u88dd\u5305\uff1a<\/p>\n<pre><code>wget https:\/\/cdn.zabbix.com\/zabbix\/sources\/stable\/3.0\/zabbix-3.0.2.tar.gz<\/code><\/pre>\n<h3 id=\"2-%e8%a7%a3%e5%a3%93%e5%ae%89%e8%a3%9d%e5%8c%85-AuGfAgLwTj\">2. \u89e3\u58d3\u5b89\u88dd\u5305<\/h3>\n<p>\u4e0b\u8f09\u5b8c\u6210\u5f8c\uff0c\u89e3\u58d3\u5b89\u88dd\u5305\uff1a<\/p>\n<pre><code>tar -zxvf zabbix-3.0.2.tar.gz<\/code><\/pre>\n<h3 id=\"3-%e6%9b%b4%e6%96%b0%e6%95%b8%e6%93%9a%e5%ba%ab%e7%b5%90%e6%a7%8b-AuGfAgLwTj\">3. \u66f4\u65b0\u6578\u64da\u5eab\u7d50\u69cb<\/h3>\n<p>\u5728\u5347\u7d1a\u4e4b\u524d\uff0c\u60a8\u9700\u8981\u66f4\u65b0\u6578\u64da\u5eab\u7d50\u69cb\u3002\u9032\u5165\u89e3\u58d3\u5f8c\u7684\u76ee\u9304\uff0c\u4e26\u904b\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre><code>cd zabbix-3.0.2\/database\/mysql\nmysql -u [username] -p zabbix &lt; schema.sql\nmysql -u [username] -p zabbix &lt; images.sql\nmysql -u [username] -p zabbix &lt; data.sql<\/code><\/pre>\n<p>\u9019\u4e9b\u547d\u4ee4\u5c07\u66f4\u65b0\u6578\u64da\u5eab\u7d50\u69cb\uff0c\u4e26\u78ba\u4fdd\u65b0\u7248\u672c\u7684 Zabbix \u80fd\u5920\u6b63\u5e38\u904b\u884c\u3002<\/p>\n<h3 id=\"4-%e6%9b%b4%e6%96%b0-zabbix-%e9%85%8d%e7%bd%ae%e6%96%87%e4%bb%b6-AuGfAgLwTj\">4. \u66f4\u65b0 Zabbix \u914d\u7f6e\u6587\u4ef6<\/h3>\n<p>\u63a5\u4e0b\u4f86\uff0c\u60a8\u9700\u8981\u66f4\u65b0 Zabbix \u7684\u914d\u7f6e\u6587\u4ef6\u3002\u5c07\u820a\u7248\u672c\u7684\u914d\u7f6e\u6587\u4ef6\u8907\u88fd\u5230\u65b0\u7248\u672c\u7684\u76ee\u9304\u4e2d\uff1a<\/p>\n<pre><code>cp \/etc\/zabbix\/zabbix_server.conf \/etc\/zabbix\/zabbix_server.conf.bak\ncp \/etc\/zabbix\/zabbix_agentd.conf \/etc\/zabbix\/zabbix_agentd.conf.bak<\/code><\/pre>\n<p>\u7136\u5f8c\uff0c\u6839\u64da\u9700\u8981\u4fee\u6539\u65b0\u7248\u672c\u7684\u914d\u7f6e\u6587\u4ef6\u3002<\/p>\n<h3 id=\"5-%e9%87%8d%e5%95%9f-zabbix-%e6%9c%8d%e5%8b%99-AuGfAgLwTj\">5. \u91cd\u555f Zabbix \u670d\u52d9<\/h3>\n<p>\u5b8c\u6210\u4ee5\u4e0a\u6b65\u9a5f\u5f8c\uff0c\u91cd\u555f Zabbix \u670d\u52d9\u4ee5\u61c9\u7528\u66f4\u6539\uff1a<\/p>\n<pre><code>systemctl restart zabbix-server\nsystemctl restart zabbix-agent<\/code><\/pre>\n<h2 id=\"%e5%8d%87%e7%b4%9a%e5%be%8c%e7%9a%84%e6%aa%a2%e6%9f%a5-AuGfAgLwTj\">\u5347\u7d1a\u5f8c\u7684\u6aa2\u67e5<\/h2>\n<p>\u5347\u7d1a\u5b8c\u6210\u5f8c\uff0c\u60a8\u61c9\u8a72\u6aa2\u67e5 Zabbix \u7684\u904b\u884c\u72c0\u614b\uff0c\u78ba\u4fdd\u6240\u6709\u529f\u80fd\u6b63\u5e38\u3002\u53ef\u4ee5\u901a\u904e\u8a2a\u554f Zabbix \u7db2\u9801\u754c\u9762\u4f86\u78ba\u8a8d\u5347\u7d1a\u662f\u5426\u6210\u529f\u3002<\/p>\n<h2 id=\"%e7%b8%bd%e7%b5%90-AuGfAgLwTj\">\u7e3d\u7d50<\/h2>\n<p>\u5728 CentOS \u7cfb\u7d71\u4e0a\u5c07 Zabbix 2.2 \u5347\u7d1a\u5230 Zabbix 3.0.2 \u7684\u904e\u7a0b\u4e2d\uff0c\u5099\u4efd\u6578\u64da\u5eab\u3001\u66f4\u65b0\u6578\u64da\u5eab\u7d50\u69cb\u53ca\u914d\u7f6e\u6587\u4ef6\u662f\u81f3\u95dc\u91cd\u8981\u7684\u6b65\u9a5f\u3002\u901a\u904e\u9019\u4e9b\u6b65\u9a5f\uff0c\u60a8\u53ef\u4ee5\u78ba\u4fdd Zabbix \u7684\u5e73\u7a69\u904b\u884c\uff0c\u4e26\u4eab\u53d7\u65b0\u7248\u672c\u5e36\u4f86\u7684\u529f\u80fd\u548c\u6027\u80fd\u63d0\u5347\u3002\u5982\u679c\u60a8\u9700\u8981\u7a69\u5b9a\u7684 <a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a> \u4f86\u904b\u884c Zabbix\uff0cServer.HK \u63d0\u4f9b\u591a\u7a2e\u9078\u64c7\uff0c\u6eff\u8db3\u60a8\u7684\u9700\u6c42\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to upgrade Zabbix from 2.2 to 3.0.2 on CentOS with step-by-step instructions for a smooth transition and enhanced monitoring features.<\/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-44172","post","type-post","status-publish","format-standard","hentry","category-setup-tutorials"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/44172","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=44172"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/44172\/revisions"}],"predecessor-version":[{"id":44173,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/44172\/revisions\/44173"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=44172"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=44172"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=44172"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}