{"id":16729,"date":"2021-01-26T09:08:22","date_gmt":"2021-01-26T01:08:22","guid":{"rendered":"http:\/\/blog.idc.net\/16729\/"},"modified":"2021-01-26T09:08:22","modified_gmt":"2021-01-26T01:08:22","slug":"ubuntu-18-04-%e4%b8%8a-zabbix-4-0-%e5%ae%89%e8%a3%85%e9%85%8d%e7%bd%ae%e5%9b%be%e6%96%87%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/idc.net\/help\/16729\/","title":{"rendered":"Ubuntu 18.04 \u4e0a Zabbix 4.0 \u5b89\u88c5\u914d\u7f6e\u56fe\u6587\u8be6\u89e3"},"content":{"rendered":"<div class=\"idc_table\">\n<p>Zabbix \u662f\u6700\u53d7\u6b22\u8fce\u7684\u5f00\u6e90\u76d1\u63a7\u8f6f\u4ef6\u5de5\u5177\u4e4b\u4e00\u3002 Zabbix \u4ece\u60a8\u7684\u7f51\u7edc\u8bbe\u5907\uff0c\u7cfb\u7edf\u548c\u5e94\u7528\u7a0b\u5e8f\u6536\u96c6\u6307\u6807\uff0c\u5e76\u786e\u4fdd\u5b83\u4eec\u6b63\u5e38\u8fd0\u884c\u3002 \u5982\u6709\u4efb\u4f55\u95ee\u9898\uff0cZabbix \u5c06\u901a\u8fc7\u5404\u79cd\u65b9\u6cd5\u53d1\u9001\u901a\u77e5\u8b66\u62a5\u3002<\/p>\n<p>Zabbix \u53ef\u4ee5\u90e8\u7f72\u7528\u4e8e\u57fa\u4e8e\u4ee3\u7406\u548c\u65e0\u4ee3\u7406\u7684\u76d1\u63a7\u3002 Zabbix \u4ee3\u7406\u5360\u7528\u7a7a\u95f4\u5c0f\uff0c\u53ef\u4ee5\u5728\u5404\u79cd\u5e73\u53f0\u4e0a\u8fd0\u884c\uff0c\u5305\u62ec Linux\uff0cUNIX\uff0cmacOS \u548c Windows\u3002<\/p>\n<p><strong>\u5fc5\u8981\u6761\u4ef6<\/strong><\/p>\n<p><strong>\u521b\u5efaMySQL\u6570\u636e\u5e93<\/strong><\/p>\n<p>\u952e\u5165\u4ee5\u4e0b\u547d\u4ee4\u767b\u5f55MySQL shell\uff1a<\/p>\n<p>Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.<\/p>\n<p>Type 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.<\/p>\n<p>MariaDB [(none)]&gt; CREATE DATABASE zabbix CHARACTER SET utf8 collate utf8_bin;<br \/>Query OK, 1 row affected (0.05 sec)<\/p>\n<p>\u4ecemysql\u63a7\u5236\u53f0\u5185\u90e8\uff0c\u8fd0\u884c\u4e0a\u9762\u8fd9\u6761SQL\u8bed\u53e5\u4ee5\u521b\u5efa\u65b0\u6570\u636e\u5e93\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u521b\u5efa\u4e00\u4e2aMySQL\u7528\u6237\u5e10\u6237\u5e76\u6388\u4e88\u5bf9\u6570\u636e\u5e93\u7684\u8bbf\u95ee\u6743\u9650\uff1a<\/p>\n<p>MariaDB [(none)]&gt; GRANT ALL ON zabbix.* TO 'zabbix'@'localhost' IDENTIFIED BY 'change-with-strong-password'; <br \/>Query OK, 0 rows affected (0.07 sec)<\/p>\n<p>\u786e\u4fdd\u4f7f\u7528\u5f3a\u5bc6\u7801\u66f4\u6539change-with-strong-password\u3002<\/p>\n<p>\u5237\u65b0\u6570\u636e\u5e93<\/p>\n<p>MariaDB [(none)]&gt; FLUSH PRIVILEGES;<br \/>Query OK, 0 rows affected (0.03 sec)<\/p>\n<p>\u5b8c\u6210\u540e\uff0c\u952e\u5165\u4ee5\u4e0b\u547d\u4ee4\u9000\u51famysql\u63a7\u5236\u53f0\uff1a<\/p>\n<p>MariaDB [(none)]&gt; EXIT;<br \/>Bye<\/p>\n<p><strong>\u5728Ubuntu\u4e0a\u5b89\u88c5Zabbix<\/strong><\/p>\n<p>\u5728\u64b0\u5199\u672c\u6587\u65f6\uff0cZabbix\u7684\u6700\u65b0\u7a33\u5b9a\u7248\u672c\u662f4.0\u7248\u3002 Ubuntu\u5b58\u50a8\u5e93\u4e2d\u63d0\u4f9b\u7684Zabbix\u8f6f\u4ef6\u5305\u7ecf\u5e38\u8fc7\u65f6\uff0c\u56e0\u6b64\u6211\u4eec\u5c06\u4f7f\u7528\u5b98\u65b9\u7684Zabbix\u5b58\u50a8\u5e93\u3002<\/p>\n<p><strong>1\u3001\u5b89\u88c5Zabbix<\/strong><\/p>\n<p>\u4f7f\u7528\u4ee5\u4e0bwget\u547d\u4ee4\u4e0b\u8f7d\u6700\u65b0\u7684Zabbix\u5b58\u50a8\u5e93.deb\u5305\uff1a<\/p>\n<p>\u4e0b\u8f7d\u6587\u4ef6\u540e\uff0c\u952e\u5165\u4ee5\u4e0b\u547d\u4ee4\u5c06Zabbix\u5b58\u50a8\u5e93\u6dfb\u52a0\u5230Ubuntu 18.04\u7cfb\u7edf\uff1a<\/p>\n<p>\u66f4\u65b0\u8f6f\u4ef6\u5305\u7d22\u5f15\u5e76\u5b89\u88c5Zabbix\u670d\u52a1\u5668\uff0c\u5e26\u6709MySQL\u6570\u636e\u5e93\u652f\u6301\u7684Web\u524d\u7aef\u548cZabbix\u4ee3\u7406\uff1a<\/p>\n<p>\u4e0a\u9762\u7684\u547d\u4ee4\u8fd8\u5c06\u5b89\u88c5Apache\uff0cPHP\u548c\u6240\u6709\u5fc5\u9700\u7684PHP\u6a21\u5757\u3002<\/p>\n<p><strong>2\u3001\u4e3aZabbix\u524d\u7aef\u914d\u7f6ePHP<\/strong><\/p>\n<p>\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5305\u542b\u6240\u6709\u5fc5\u9700\u7684Apache\u548cPHP\u8bbe\u7f6e\u7684Apache\u914d\u7f6e\u6587\u4ef6\u3002 \u60a8\u53ea\u9700\u8fdb\u884c\u4e00\u4e9b\u5c0f\u6539\u52a8\u5e76\u8bbe\u7f6e\u9002\u5f53\u7684\u65f6\u533a\u3002<\/p>\n<p>\u6253\u5f00\u914d\u7f6e\u6587\u4ef6\uff0c\u53d6\u6d88\u6ce8\u91ca\u65f6\u533a\u7ebf\u5e76\u5c06\u5176\u66f4\u6539\u4e3a\u60a8\u7684\u65f6\u533a\u3002\u60a8\u53ef\u4ee5\u5728\u6b64\u5904\u627e\u5230PHP\u652f\u6301\u7684\u5b8c\u6574\u65f6\u533a\u5217\u8868\u3002<\/p>\n<p>...<br \/>&nbsp; &nbsp; &lt;IfModule mod_php7.c&gt;<br \/>&nbsp; &nbsp; &nbsp; &nbsp; php_value max_execution_time 300<br \/>&nbsp; &nbsp; &nbsp; &nbsp; php_value memory_limit 128M<br \/>&nbsp; &nbsp; &nbsp; &nbsp; php_value post_max_size 16M<br \/>&nbsp; &nbsp; &nbsp; &nbsp; php_value upload_max_filesize 2M<br \/>&nbsp; &nbsp; &nbsp; &nbsp; php_value max_input_time 300<br \/>&nbsp; &nbsp; &nbsp; &nbsp; php_value max_input_vars 10000<br \/>&nbsp; &nbsp; &nbsp; &nbsp; php_value always_populate_raw_post_data -1<br \/>&nbsp; &nbsp; &nbsp; &nbsp; php_value date.timezone&nbsp;<span style=\"color: #ff0000\">Asia\/Shanghai<\/span><br \/>&nbsp; &nbsp; &lt;\/IfModule&gt;<br \/>...<\/p>\n<p>\u5b8c\u6210\u540e\uff0c\u4fdd\u5b58\u914d\u7f6e\u6587\u4ef6\u5e76\u91cd\u65b0\u542f\u52a8Apache\u670d\u52a1\u4ee5\u4f7f\u66f4\u6539\u751f\u6548\uff1a<\/p>\n<p><strong>3\u3001\u4e3aZabbix Server\u914d\u7f6eMySQL\u6570\u636e\u5e93<\/strong><\/p>\n<p>Zabbix\u5b89\u88c5\u5305\u63d0\u4f9b\u4e86\u4e00\u4e2a\u8f6c\u50a8\u6587\u4ef6\uff0c\u5176\u4e2d\u5305\u542bZabbix\u670d\u52a1\u5668\u548cMySQL\u7684\u521d\u59cb\u6a21\u5f0f\u548c\u6570\u636e\u3002<\/p>\n<p>\u901a\u8fc7\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5bfc\u5165MySQL\u8f6c\u50a8\u6587\u4ef6\uff1a<\/p>\n<p>\u51fa\u73b0\u63d0\u793a\u65f6\uff0c\u8f93\u5165\u60a8\u4e4b\u524d\u521b\u5efa\u7684\u7528\u6237\u5bc6\u7801\u3002 \u6210\u529f\u65f6\uff0c\u6ca1\u6709\u7ed9\u51fa\u8f93\u51fa\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u9700\u8981\u7f16\u8f91Zabbix\u914d\u7f6e\u5e76\u8bbe\u7f6e\u6570\u636e\u5e93\u5bc6\u7801\u3002<\/p>\n<p>\u5728\u7f16\u8f91\u5668\u4e2d\u6253\u5f00\u914d\u7f6e\u6587\u4ef6\uff1a<\/p>\n<p>\u641c\u7d22\u4ee5\u4e0b\u90e8\u5206\uff0c\u53d6\u6d88\u6ce8\u91caDBPassword\u6307\u4ee4\u5e76\u6dfb\u52a0\u6570\u636e\u5e93\u5bc6\u7801\u3002<\/p>\n<p>...<\/p>\n<p>### Option: DBPassword<br \/>#&nbsp; &nbsp; &nbsp; Database password.<br \/>#&nbsp; &nbsp; &nbsp; Comment this line if no password is used.<br \/>#<br \/># Mandatory: no<br \/># Default:<br \/><span style=\"color: #ff0000\">DBPassword=change-with-strong-password<\/span><br \/>...<\/p>\n<p>\u4fdd\u5b58\u5e76\u5173\u95ed\u6587\u4ef6\u3002<\/p>\n<p>\u91cd\u65b0\u542f\u52a8Zabbib\u670d\u52a1\u5668\u548c\u4ee3\u7406\u670d\u52a1\uff0c\u5e76\u4f7f\u5b83\u4eec\u5728\u7cfb\u7edf\u5f15\u5bfc\u65f6\u542f\u52a8\uff1a<\/p>\n<p>\u8981\u68c0\u67e5Zabbix\u670d\u52a1\u5668\u662f\u5426\u6b63\u5728\u8fd0\u884c\uff0c\u8bf7\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a<\/p>\n<p>\u5b89\u88c5\u548c\u914d\u7f6eZabbix\u524d\u7aef<\/p>\n<p>Zabbix Web\u754c\u9762\u662f\u7528PHP\u7f16\u5199\u7684\uff0c\u5141\u8bb8\u6211\u4eec\u914d\u7f6e\u670d\u52a1\u5668\uff0c\u67e5\u770b\u6536\u96c6\u7684\u6570\u636e\u5e76\u6dfb\u52a0\u6211\u4eec\u60f3\u8981\u76d1\u63a7\u7684\u4e3b\u673a\u3002<\/p>\n<p>\u5728\u5f00\u59cb\u4f7f\u7528Web\u754c\u9762\u4e4b\u524d\uff0c\u6211\u4eec\u9700\u8981\u5b89\u88c5\u5b83\u3002<\/p>\n<p>\u6253\u5f00\u60a8\u559c\u6b22\u7684\u6d4f\u89c8\u5668\u5e76\u952e\u5165\u60a8\u7684\u670d\u52a1\u5668\u7684\u57df\u540d\u6216\u516c\u5171IP\u5730\u5740\uff0c\u7136\u540e\u952e\u5165 \/zabbix\uff1a<\/p>\n<p>\u5728\u7b2c\u4e00\u4e2a\u5c4f\u5e55\u4e0a\uff0c\u60a8\u5c06\u770b\u5230\u6b22\u8fce\u4fe1\u606f\u3002 \u5355\u51fb\u4e0b\u4e00\u6b65\u7ee7\u7eed\u3002<\/p>\n<p style=\"text-align: center\">Zabbix 4.0 \u5b89\u88c5\u622a\u56fe<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u60a8\u5c06\u770b\u5230\u4ee5\u4e0b\u4fe1\u606f\u9875\u9762\uff0c\u5176\u4e2d\u5217\u51fa\u4e86\u8fd0\u884cZabbix\u524d\u7aef\u6240\u9700\u7684\u6240\u6709PHP\u5148\u51b3\u6761\u4ef6\u3002 \u6b64\u8868\u4e2d\u7684\u6240\u6709\u503c\u90fd\u5e94\u8be5\u662f\u6b63\u5e38\u7684\uff0c\u5411\u4e0b\u6eda\u52a8\u4ee5\u9a8c\u8bc1\u662f\u5426\u6240\u6709\u5185\u5bb9\u90fd\u5df2\u6b63\u786e\u8bbe\u7f6e\u3002 \u9a8c\u8bc1\u540e\uff0c\u5355\u51fb\u201c\u4e0b\u4e00\u6b65\u201d\u7ee7\u7eed\u3002<\/p>\n<p style=\"text-align: center\">Check of pre-requisites<\/p>\n<p>\u5728\u4e0b\u4e00\u4e2a\u5c4f\u5e55\u4e0a\uff0c\u5b89\u88c5\u5411\u5bfc\u5c06\u8981\u6c42\u60a8\u8f93\u5165\u6570\u636e\u5e93\u8fde\u63a5\u8be6\u7ec6\u4fe1\u606f\u3002 \u8f93\u5165\u60a8\u4e4b\u524d\u521b\u5efa\u7684MySQL\u7528\u6237\u548c\u6570\u636e\u5e93\u8be6\u7ec6\u4fe1\u606f\u3002<\/p>\n<p style=\"text-align: center\">zabbix-configure-db-connection<\/p>\n<p>\u8f93\u5165\u670d\u52a1\u5668\u7684\u540d\u79f0\u662f\u53ef\u9009\u7684\u3002 \u5982\u679c\u60a8\u6709\u591a\u4e2aZabbix\u76d1\u63a7\u670d\u52a1\u5668\uff0c\u8bf7\u8f93\u5165\u5b83\u3002 \u5982\u679c\u63d0\u4f9b\uff0c\u5b83\u5c06\u663e\u793a\u5728\u83dc\u5355\u680f\u548c\u9875\u9762\u6807\u9898\u4e2d\u3002<\/p>\n<p>\u5355\u51fb\u4e0b\u4e00\u6b65\u7ee7\u7eed\u3002<\/p>\n<p style=\"text-align: center\">zabbix-server-details<\/p>\n<p>\u5728\u4e0b\u4e00\u4e2a\u5c4f\u5e55\u4e0a\uff0c\u60a8\u5c06\u770b\u5230\u5b89\u88c5\u524d\u6458\u8981\u3002<\/p>\n<p style=\"text-align: center\">Pre-installation summary<\/p>\n<p>\u5355\u51fb\u4e0b\u4e00\u6b65\uff0c\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u5c06\u8fdb\u5165\u4e00\u4e2a\u9875\u9762\uff0c\u901a\u77e5\u60a8\u5df2\u5b89\u88c5Zabbix Web\u754c\u9762\u3002 \u8981\u8bbf\u95eeZabbix\u767b\u5f55\u9875\u9762\uff0c\u8bf7\u5355\u51fb\u201c\u5b8c\u6210\u201d\u6309\u94ae\u3002<\/p>\n<p style=\"text-align: center\">zabbix-install<\/p>\n<p>\u606d\u559c\u4f60\uff01 \u60a8\u5df2\u6210\u529f\u5b89\u88c5Zabbix\u524d\u7aef\u3002<br \/>\u914d\u7f6e\u6587\u4ef6\u201c \/usr\/share\/zabbix\/conf\/zabbix.conf.php\u201d\u5df2\u521b\u5efa\u3002<\/p>\n<p>\u9ed8\u8ba4\u7528\u6237\u4e3a\u201cAdmin\u201d\uff0c\u5bc6\u7801\u4e3a\u201czabbix\u201d\u3002 \u8f93\u5165\u7528\u6237\u540d\u548c\u5bc6\u7801\uff0c\u7136\u540e\u5355\u51fb\u201c\u767b\u5f55\u201d\u6309\u94ae\u3002<\/p>\n<p style=\"text-align: center\">zabbix-login-screen<\/p>\n<p>\u767b\u5f55\u540e\uff0c\u60a8\u5c06\u88ab\u91cd\u5b9a\u5411\u5230Zabbix\u7ba1\u7406\u4eea\u8868\u677f\u3002<\/p>\n<p>\u4ece\u8fd9\u91cc\u5f00\u59cb\uff0c\u60a8\u53ef\u4ee5\u5f00\u59cb\u81ea\u5b9a\u4e49Zabbix\u5b89\u88c5\u5e76\u6dfb\u52a0\u65b0\u4e3b\u673a\u3002 \u60a8\u7684\u7b2c\u4e00\u6b65\u5e94\u8be5\u662f\u66f4\u6539\u5f53\u524d\u5bc6\u7801\u3002 \u8981\u6267\u884c\u6b64\u64cd\u4f5c\uff0c\u8bf7\u5355\u51fb\u9876\u90e8\u5bfc\u822a\u4e0a\u7684\u914d\u7f6e\u6587\u4ef6\u56fe\u6807\u5bfc\u822a\u5230\u7528\u6237\u914d\u7f6e\u6587\u4ef6\u9875\u9762\u3002<\/p>\n<p><strong>\u5c06\u65b0\u4e3b\u673a\u6dfb\u52a0\u5230Zabbix\u670d\u52a1\u5668<\/strong><\/p>\n<p>\u5c06\u7528\u4e8e\u76d1\u89c6\u7684\u65b0\u4e3b\u673a\u6dfb\u52a0\u5230Zabbix\u670d\u52a1\u5668\u7684\u8fc7\u7a0b\u5305\u62ec\u4e24\u4e2a\u6b65\u9aa4\u3002<\/p>\n<p>\u9996\u5148\uff0c\u60a8\u9700\u8981\u5728\u8fdc\u7a0b\u4e3b\u673a\u4e0a\u5b89\u88c5Zabbix\u4ee3\u7406\uff0c\u7136\u540e\u901a\u8fc7Web\u754c\u9762\u5c06\u4e3b\u673a\u6dfb\u52a0\u5230Zabbix\u670d\u52a1\u5668\u3002<\/p>\n<p><strong>\u5b89\u88c5Zabbix\u4ee3\u7406<\/strong><\/p>\n<p>\u4e0e\u5b89\u88c5Zabbix\u670d\u52a1\u5668\u65f6\u76f8\u540c\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u542f\u7528Zabbix\u5b58\u50a8\u5e93\uff1a<br \/>wget https:\/\/repo.zabbix.com\/zabbix\/4.0\/ubuntu\/pool\/main\/z\/zabbix-release\/zabbix-release_4.0-2+bionic_all.deb<br \/>sudo apt install .\/zabbix-release_4.0-2+bionic_all.deb<\/p>\n<p>\u66f4\u65b0\u7a0b\u5e8f\u5305\u7d22\u5f15\u5e76\u5b89\u88c5Zabbix\u4ee3\u7406\u7a0b\u5e8f\u5305\uff1a<\/p>\n<p>sudo apt update<br \/>sudo apt install zabbix-agent<\/p>\n<p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u751f\u6210\u9884\u5171\u4eab\u5bc6\u94a5\u5e76\u5c06\u5176\u4fdd\u5b58\u5230\u6587\u4ef6\u4e2d\uff1a<\/p>\n<p>PSK\u952e\u770b\u8d77\u6765\u50cf\u8fd9\u6837\uff1a<\/p>\n<p>d29afe7076f78793aef43dfc6459a9c148050afca95968a77eaad2d1c0349b2e<\/p>\n<p>\u6253\u5f00Zabbix\u4ee3\u7406\u914d\u7f6e\u6587\u4ef6\uff1a<\/p>\n<p>\u641c\u7d22\u670d\u52a1\u5668IP\u5730\u5740\u5e76\u5c06\u5176\u4ece\u9ed8\u8ba4\u503c\u66f4\u6539\u4e3aZabbix\u670d\u52a1\u5668IP\uff1a<\/p>\n<p>\/etc\/zabbix\/zabbix_agentd.conf<\/p>\n<p>...<br \/>### Option: Server<br \/>#&nbsp; &nbsp; &nbsp; List of comma delimited IP addresses, optionally in CIDR notation, or DNS names of Zabbix servers and Zabbix proxies.<br \/>#&nbsp; &nbsp; &nbsp; Incoming connections will be accepted only from the hosts listed here.<br \/>#&nbsp; &nbsp; &nbsp; If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally<br \/>#&nbsp; &nbsp; &nbsp; and '::\/0' will allow any IPv4 or IPv6 address.<br \/>#&nbsp; &nbsp; &nbsp; '0.0.0.0\/0' can be used to allow any IPv4 address.<br \/>#&nbsp; &nbsp; &nbsp; Example: Server=127.0.0.1,192.168.1.0\/24,::1,2001:db8::\/32,zabbix.example.com<br \/>#<br \/># Mandatory: yes, if StartAgents is not explicitly set to 0<br \/># Default:<br \/># Server=<\/p>\n<p>Server=127.0.0.1<br \/>...<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u627e\u5230TSLConnect\u9009\u9879\uff0c\u53d6\u6d88\u6ce8\u91ca\u5e76\u5c06\u5176\u8bbe\u7f6e\u4e3apsk\uff1a<\/p>\n<p>\/etc\/zabbix\/zabbix_agentd.conf<\/p>\n<p>...<br \/>### Option: TLSConnect<br \/>#&nbsp; &nbsp; &nbsp; How the agent should connect to server or proxy. Used for active checks.<br \/>#&nbsp; &nbsp; &nbsp; Only one value can be specified:<br \/>#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; unencrypted - connect without encryption<br \/>#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; psk&nbsp; &nbsp; &nbsp; &nbsp; - connect using TLS and a pre-shared key<br \/>#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cert&nbsp; &nbsp; &nbsp; &nbsp; - connect using TLS and a certificate<br \/>#<br \/># Mandatory: yes, if TLS certificate or PSK parameters are defined (even for 'unencrypted' connection)<br \/># Default:<br \/>TLSConnect=psk<br \/>...<\/p>\n<p>\u627e\u5230TLSAccept\u9009\u9879\uff0c\u53d6\u6d88\u6ce8\u91ca\u5e76\u5c06\u5176\u8bbe\u7f6e\u4e3apsk\uff1a<\/p>\n<p>\/etc\/zabbix\/zabbix_agentd.conf<\/p>\n<p>...<br \/>### Option: TLSAccept<br \/>#&nbsp; &nbsp; &nbsp; What incoming connections to accept.<br \/>#&nbsp; &nbsp; &nbsp; Multiple values can be specified, separated by comma:<br \/>#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; unencrypted - accept connections without encryption<br \/>#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; psk&nbsp; &nbsp; &nbsp; &nbsp; - accept connections secured with TLS and a pre-shared key<br \/>#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cert&nbsp; &nbsp; &nbsp; &nbsp; - accept connections secured with TLS and a certificate<br \/>#<br \/># Mandatory: yes, if TLS certificate or PSK parameters are defined (even for 'unencrypted' connection)<br \/># Default:<br \/>TLSAccept=psk<br \/>...<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u627e\u5230TLSPSKIdentity\u9009\u9879\uff0c\u53d6\u6d88\u6ce8\u91ca\u5e76\u5c06\u5176\u8bbe\u7f6e\u4e3aPSK 001\u8be5\u503c\u5fc5\u987b\u662f\u552f\u4e00\u7684\u5b57\u7b26\u4e32\uff1a<\/p>\n<p>\/etc\/zabbix\/zabbix_agentd.conf<\/p>\n<p>...<br \/>### Option: TLSPSKIdentity<br \/>#&nbsp; &nbsp; &nbsp; Unique, case sensitive string used to identify the pre-shared key.<br \/>#<br \/># Mandatory: no<br \/># Default:<br \/>TLSPSKIdentity=PSK 001<br \/>...<\/p>\n<p>\u6700\u540e\uff0c\u627e\u5230TLSPSKFile\u9009\u9879\uff0c\u53d6\u6d88\u6ce8\u91ca\u5e76\u5c06\u5176\u8bbe\u7f6e\u4e3a\u6307\u5411\u5148\u524d\u521b\u5efa\u7684\u9884\u5171\u4eab\u5bc6\u94a5\uff1a<\/p>\n<p>\/etc\/zabbix\/zabbix_agentd.conf<\/p>\n<p>...<br \/>### Option: TLSPSKFile<br \/>#&nbsp; &nbsp; &nbsp; Full pathname of a file containing the pre-shared key.<br \/>#<br \/># Mandatory: no<br \/># Default:<br \/>TLSPSKFile=\/etc\/zabbix\/zabbix_agentd.psk <br \/>...<\/p>\n<p>\u5b8c\u6210\u540e\uff0c\u4fdd\u5b58\u5e76\u5173\u95ed\u6587\u4ef6\u3002<\/p>\n<p>\u542f\u52a8Zabbix\u4ee3\u7406\u670d\u52a1\u5e76\u5c06\u5176\u8bbe\u7f6e\u4e3a\u5728\u542f\u52a8\u65f6\u542f\u52a8\uff1a<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u60a8\u9700\u8981\u6dfb\u52a0\u9632\u706b\u5899\u89c4\u5219\uff0c\u4ee5\u4fbf\u5728TCP\u7aef\u53e310050\u4e0a\u542f\u7528\u6765\u81eaZabbix\u670d\u52a1\u5668\u7684\u6d41\u91cf\u3002<\/p>\n<p>\u5047\u8bbe\u60a8\u6b63\u5728\u4f7f\u7528UFW\u6765\u7ba1\u7406\u9632\u706b\u5899\uff0c\u5e76\u4e14\u60a8\u5e0c\u671b\u5141\u8bb8\u4ece192.168.166.189 IP\u5730\u5740\u8fdb\u884c\u8bbf\u95ee\uff0c\u90a3\u4e48\u60a8\u5c06\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p><strong>\u8bbe\u7f6e\u65b0\u4e3b\u673a<\/strong><\/p>\n<p>\u65e2\u7136\u5df2\u5b89\u88c5\u5e76\u914d\u7f6e\u4e86\u8981\u76d1\u89c6\u7684\u8fdc\u7a0b\u4e3b\u673a\u4e0a\u7684\u4ee3\u7406\uff0c\u5219\u4e0b\u4e00\u6b65\u9aa4\u662f\u5728Zabbix\u670d\u52a1\u5668\u4e0a\u6ce8\u518c\u4e3b\u673a\u3002<\/p>\n<p>\u4ee5admin\u7528\u6237\u767b\u5f55Zabbix Server Web\u754c\u9762\uff1a<\/p>\n<p>\u8fdb\u5165\u5185\u90e8\u540e\uff0c\u5728\u9876\u90e8\u5bfc\u822a\u680f\u4e2d\u5355\u51fb\u201c\u914d\u7f6e\u201d\uff0c\u7136\u540e\u5355\u51fb\u201c\u4e3b\u673a\u201d<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u5355\u51fb\u5c4f\u5e55\u53f3\u4e0a\u89d2\u7684\u84dd\u8272\u201c\u521b\u5efa\u4e3b\u9898\u201d\u6309\u94ae\uff0c\u5c06\u6253\u5f00\u4e3b\u673a\u914d\u7f6e\u9875\u9762\uff1a<\/p>\n<p style=\"text-align: center\">zabbix-hosts-host<\/p>\n<p>\u8f93\u5165\u8981\u76d1\u89c6\u7684\u8fdc\u7a0b\u4e3b\u673a\u7684\u4e3b\u673a\u540d\u548cIP\u5730\u5740\u3002 \u901a\u8fc7\u4ece\u5217\u8868\u4e2d\u9009\u62e9\u7ec4\uff0c\u5c06\u4e3b\u673a\u6dfb\u52a0\u5230\u4e00\u4e2a\u6216\u591a\u4e2a\u7ec4\uff0c\u6216\u8f93\u5165\u4e0d\u5b58\u5728\u7684\u7ec4\u540d\u79f0\u4ee5\u521b\u5efa\u65b0\u7ec4\u3002 Linux servers\u7ec4\u662f\u4e00\u4e2a\u4e0d\u9519\u7684\u9009\u62e9\uff08\u5982\u56fe\uff09\u3002<\/p>\n<p style=\"text-align: center\">zabbix-hosts-templateszabbix-hosts-templates<\/p>\n<p>\u5b8c\u6210\u540e\uff0c\u5355\u51fb\u201c\u6a21\u677f\u201d\u9009\u9879\u5361\u3002 \u9009\u62e9Template OS Linux\u5e76\u5355\u51fbAdd\u94fe\u63a5\u5c06\u6a21\u677f\u6dfb\u52a0\u5230\u4e3b\u673a\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u5355\u51fb\u201c\u52a0\u5bc6\u201d\u9009\u9879\u5361\u3002 \u4e3a\u4e3b\u673a\u8fde\u63a5\u548c\u4e3b\u673a\u8fde\u63a5\u9009\u62e9PSK\u3002<\/p>\n<p>\u5c06PSK\u6807\u8bc6\u503c\u8bbe\u7f6e\u4e3aPSK 001\uff0c\u5373\u60a8\u5728\u4e0a\u4e00\u6b65\u4e2d\u914d\u7f6e\u7684Zabbix\u4ee3\u7406\u7684TLSPSKIdentity\u9009\u9879\u7684\u503c\u3002<\/p>\n<p>\u5728PSK\u503c\u5b57\u6bb5\u4e2d\uff0c\u6dfb\u52a0\u4e3aZabbix\u4ee3\u7406\u751f\u6210\u7684\u5bc6\u94a5\uff0c\u5373\u5b58\u50a8\u5728\/etc\/zabbix\/zabbix_agentd.psk\u6587\u4ef6\u4e2d\u7684\u5bc6\u94a5\u3002<\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" src=\"https:\/\/www.linuxidc.com\/upload\/2020_04\/20040417027276.png\" align=\"center\" class=\"aligncenter\">&nbsp;<\/p>\n<p style=\"text-align: center\">zabbix-hosts-encryptionzabbix-hosts-encryption<\/p>\n<p>\u6700\u540e\uff0c\u8981\u6dfb\u52a0\u4e3b\u673a\uff0c\u8bf7\u5355\u51fb\u84dd\u8272\u7684\u201c\u6dfb\u52a0\u201d\u6309\u94ae\u3002<\/p>\n<p><strong>\u603b\u7ed3<\/strong><\/p>\n<p>\u60a8\u5df2\u5728Ubuntu\u7cfb\u7edf\u4e0a\u6210\u529f\u5b89\u88c5\u4e86\u6700\u65b0\u7684Zabbix\uff0c\u5e76\u5b66\u4e60\u4e86\u5982\u4f55\u6dfb\u52a0\u8981\u76d1\u89c6\u7684\u65b0\u4e3b\u673a\u3002<\/p>\n<p>\u60a8\u73b0\u5728\u5e94\u8be5\u67e5\u770bZabbix\u6587\u6863\u5e76\u4e86\u89e3\u6709\u5173\u5982\u4f55\u914d\u7f6e\u548c\u4f7f\u7528Zabbix\u7684\u66f4\u591a\u4fe1\u606f\u3002<\/p>\n<p>\u5982\u679c\u60a8\u9047\u5230\u95ee\u9898\u6216\u6709\u53cd\u9988\uff0c\u8bf7\u5728\u4e0b\u9762\u7559\u8a00\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Zabbix \u662f\u6700\u53d7\u6b22\u8fce\u7684\u5f00\u6e90\u76d1\u63a7\u8f6f\u4ef6\u5de5\u5177\u4e4b\u4e00\u3002 Zabbix \u4ece\u60a8\u7684\u7f51\u7edc\u8bbe\u5907\uff0c\u7cfb\u7edf\u548c\u5e94\u7528\u7a0b\u5e8f\u6536\u96c6\u6307\u6807\uff0c\u5e76\u786e\u4fdd [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28],"tags":[],"class_list":["post-16729","post","type-post","status-publish","format-standard","hentry","category-ubuntu"],"_links":{"self":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/16729","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/comments?post=16729"}],"version-history":[{"count":0,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/16729\/revisions"}],"wp:attachment":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/media?parent=16729"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/categories?post=16729"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/tags?post=16729"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}