{"id":629,"date":"2020-10-14T08:10:06","date_gmt":"2020-10-14T00:10:06","guid":{"rendered":"http:\/\/wp.vicds.com\/?p=629"},"modified":"2021-05-17T15:42:03","modified_gmt":"2021-05-17T07:42:03","slug":"zabbix-debian","status":"publish","type":"post","link":"https:\/\/wp.vicds.com\/?p=629","title":{"rendered":"zabbix @debian"},"content":{"rendered":"\n<p>\u6b64\u985e\u8edf\u9ad4\u6700\u597d\u7528\u6700\u65b0\u7248, \u56e0\u6b64\u5148\u5230\u5b98\u7db2\u6293release<\/p>\n\n\n\n<p><a href=\"https:\/\/www.zabbix.com\/download\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.zabbix.com\/download<\/a><\/p>\n\n\n\n<p>\u9078\u64c7\u8981\u7528\u7684\u985e\u578b\u4e4b\u5f8c\u4e0b\u8f09\u5b89\u88dd.<\/p>\n\n\n\n<p>dpkg -i zabbix-release_5.0-1+buster_all.deb<\/p>\n\n\n\n<p><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apt update\napt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-agent apache2 mariadb-server<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p># mysql -uroot -p<br>password<br>#mysql&gt; create database zabbix character set utf8 collate utf8_unicode_ci;<\/p>\n\n\n\n<p>mysql&gt;create database zabbix character set utf8 collate utf8_bin;<br>mysql&gt; create user zabbix@localhost identified by &#8216;password&#8217;;<br>mysql&gt; grant all privileges on zabbix.* to zabbix@localhost;<br>mysql&gt; quit;<\/p>\n\n\n\n<p>\u5c0e\u5165\u521d\u59cb\u7bc4\u4f8b, \u9019\u88e1\u6703\u8981\u8f38\u5165\u5bc6\u78bc<\/p>\n\n\n\n<p>zcat \/usr\/share\/doc\/zabbix-server-mysql\/create.sql.gz | mysql -uzabbix -p zabbix<\/p>\n\n\n\n<p>\u4fee\u6539&nbsp;\/etc\/zabbix\/zabbix_server.conf \u9019\u500b\u6a94\u88e1\u7684DBPassword, \u586b\u5165\u525b\u525b\u8f38\u5165\u7684\u5bc6\u78bc<\/p>\n\n\n\n<p>\u4fee\u6539 \/etc\/zabbix\/apache.conf \u88e1\u7684timezone &#8220;Asia\/Taipei&#8221;, \u5728\u9019\u88e1\u6211\u4fee\u6539\u5931\u6557, \u9032\u7db2\u9801\u9084\u662f\u63d0\u793a\u6c92\u6709\u6539\u5230, \u56e0\u6b64\u6211\u6539\u9019\u500b\u6a94 \/etc\/php\/7.3\/apache2\/php.ini<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u555f\u52d5\u670d\u52d9<\/p>\n\n\n\n<p>systemctl restart zabbix-server zabbix-agent apache2<br>systemctl enable zabbix-server zabbix-agent apache2<\/p>\n\n\n\n<p>\u700f\u89bd\u5668\u8f38\u5165http:\/\/server_ip_or_name\/zabbix<\/p>\n\n\n\n<p>\u6700\u626f\u7684\u662f\u6253\u4e86\u534a\u5929, \u9810\u8a2d\u767b\u5165\u5e33\u865f\u662fAdmin \u5bc6\u78bc\u662fzabbix \u5728\u5b89\u88dd\u904e\u7a0b\u4e2d\u537b\u6c92\u63d0\u5230.<\/p>\n\n\n\n<p>\u9032\u53bb\u5f8c\u4e26\u6c92\u6709\u958b\u555f\u8b93\u4f60\u4fee\u6539\u70ba\u4e2d\u6587\u7684\u9078\u9805, \u4fee\u6539\u4ee5\u4e0b\u6a94\u6848<\/p>\n\n\n\n<p>vim \/usr\/share\/zabbix\/include\/locales.inc.php<\/p>\n\n\n\n<p>\u627e\u5230zh_TW, \u628a\u5f8c\u9762\u7684false\u6539true<\/p>\n\n\n\n<p>\u5982\u679c\u9084\u662f\u6c92\u4e2d\u6587, \u53ef\u80fd\u662flocales\u88e1\u6c92\u6709<\/p>\n\n\n\n<p>dpkg-reconfigure locales<\/p>\n\n\n\n<p>\u9078zh_TW.UTF8, \u91cd\u555fapache<\/p>\n\n\n\n<p>systemctl restart apache2<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u63a5\u4e0b\u4f86\u662f\u5ba2\u6236\u7aef, \u5230\u5b98\u65b9\u4e0b\u8f09\u5ba2\u6236\u7aef\u7a0b\u5f0f, \u5728\u9019\u88e1\u7528windows No encryption<\/p>\n\n\n\n<p><a href=\"https:\/\/www.zabbix.com\/download_agents\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.zabbix.com\/download_agents<\/a><\/p>\n\n\n\n<p>\u4e0b\u8f09\u56de\u4f86\u5f8c\u5728C:\\\u5275\u4e00\u500b\u8cc7\u6599\u593e\u53ebzabbix, \u628a\u58d3\u7e2e\u6a94\u4e1f\u9032\u53bb\u89e3\u58d3<\/p>\n\n\n\n<p>\u6211\u662f\u628aconf\u8cc7\u6599\u593e\u88e1\u7684conf\u6a94\u4e1f\u5230BIN\u540c\u76ee\u9304, \u4fee\u6539zabbix_agentd.conf<\/p>\n\n\n\n<p>Server=192.168.20.10   \u70bazabbix server ip<\/p>\n\n\n\n<p>ListenPort=10050   \u9810\u8a2dport<\/p>\n\n\n\n<p>ServerActive=192.168.20.10:10050<\/p>\n\n\n\n<p>Hostname=Zabbix server   \u9019\u500b\u8981\u8ddfserver\u540c\u540d, \u6ce8\u610f\u5927\u5c0f\u5beb<\/p>\n\n\n\n<p>\u5b89\u88dd\u670d\u52d9<\/p>\n\n\n\n<p>c:\\zabbix\\zabbix_agentd.exe -c zabbix_agentd.conf -i<\/p>\n\n\n\n<p>\u555f\u52d5\u670d\u52d9<\/p>\n\n\n\n<p>c:\\zabbix\\zabbix_agentd.exe -c zabbix_agentd.conf -s<\/p>\n\n\n\n<p>\u53c3\u6578\u7528 zabbix_agentd.exe -h\u67e5<\/p>\n\n\n\n<p>win+r  services.msc \u67e5\u770bzabbix_agentd\u6709\u6c92\u6709\u8a2d\u6210\u81ea\u52d5\u555f\u52d5<\/p>\n\n\n\n<p>\u53e6\u5916\u9632\u706b\u7246\u8981\u5728inbound\u6253\u500b10050\u7684\u6d1e\u7d66\u5b83\u904e<\/p>\n\n\n\n<p>\u63a5\u4e0b\u4f86\u56de\u5230zabbix\u7db2\u9801, \u5728Configuration&gt;Hosts&gt;Create host, \u5728interfaces\u88e1add\u525b\u525bwindows\u7684IP, Templates\u9078Windows by Zabbix agent.<\/p>\n\n\n\n<p>\u56de\u5230Monitoring&gt;Hosts\u5c31\u53ef\u4ee5\u770b\u5230\u65b0\u589e\u7684Client\u56c9<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>P.S.-1:\u9019\u5957\u662f\u6709\u9810\u8a2dWorking time\u7684, \u4e0d\u5728\u8a2d\u5b9a\u6642\u9593\u5167\u662f\u4e0d\u6703\u555f\u52d5\u7684, \u5728Adminsration&gt;General&gt;Working time\u4e2d\u8a2d\u5b9a.<\/p>\n\n\n\n<p>P.S.-2:\u5982\u679c\u51fa\u73fe\u4e2d\u6587\u65b9\u584a\u5b57\u7684\u8a71, \/etc\/alternatives\/zabbix-frontend-font\u6307\u5411DejaVuSans.ttf, \u9019\u500b\u5b57\u578b\u6c92\u6709\u4e2d\u6587, \u6240\u4ee5\u4e0a\u50b3\u4e00\u500b\u4e2d\u6587ttf\u7684\u5b57\u578b, ln -s\u904e\u53bb\u5c31\u597d\u4e86<\/p>\n\n\n\n<p>mv \/etc\/alternatives\/zabbix-frontend-font \/etc\/alternatives\/zabbix-frontend-font.orig<\/p>\n\n\n\n<p>ln -s \/usr\/share\/fonts\/truetype\/msjh.ttf \/etc\/alternatives\/zabbix-frontend-font<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u7d93\u6e2c\u8a66, \u53ef\u4ee5\u505amulti server, \u5728conf\u6a94\u88e1\u6307\u5b9aserver ip\u6642, \u52a0\u4e0a\u53e6\u4e00\u7d44IP\u5373\u53ef.<\/p>\n\n\n\n<p>Server=192.168.20.10,192.168.20.12<\/p>\n\n\n\n<p>ServerActive=192.168.20.10:10050,192.168.20.12:10050<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6b64\u985e\u8edf\u9ad4\u6700\u597d\u7528\u6700\u65b0\u7248, \u56e0\u6b64\u5148\u5230\u5b98\u7db2\u6293rel [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,1],"tags":[],"class_list":["post-629","post","type-post","status-publish","format-standard","hentry","category-linux","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/wp.vicds.com\/index.php?rest_route=\/wp\/v2\/posts\/629","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.vicds.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.vicds.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.vicds.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.vicds.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=629"}],"version-history":[{"count":21,"href":"https:\/\/wp.vicds.com\/index.php?rest_route=\/wp\/v2\/posts\/629\/revisions"}],"predecessor-version":[{"id":907,"href":"https:\/\/wp.vicds.com\/index.php?rest_route=\/wp\/v2\/posts\/629\/revisions\/907"}],"wp:attachment":[{"href":"https:\/\/wp.vicds.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.vicds.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.vicds.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}