{"id":96174,"date":"2024-05-19T06:28:13","date_gmt":"2024-05-18T22:28:13","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=96174"},"modified":"2024-05-19T06:28:13","modified_gmt":"2024-05-18T22:28:13","slug":"debian-9-netdata","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/debian-9-netdata.html","title":{"rendered":"\u5728Debian 9\u4e0a\u5b89\u88c5\u548c\u4f7f\u7528Netdata\u6027\u80fd\u76d1\u63a7\u5de5\u5177"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nNetdata\u662f\u4e00\u4e2a\u514d\u8d39\u7684\uff0c\u5f00\u6e90\u7684\uff0c\u53ef\u6269\u5c55\u7684\uff0c\u5206\u5e03\u5f0f\u7684\uff0c\u5b9e\u65f6\u7684\uff0c\u6027\u80fd\u548c\u5065\u5eb7\u76d1\u6d4b\u5de5\u5177\uff0c\u7528\u4e8e\u57fa\u4e8eLinux\u7684\u64cd\u4f5c\u7cfb\u7edf\u3002 Netdata\u9644\u5e26\u7b80\u5355\uff0c\u6613\u7528\u4e14\u53ef\u6269\u5c55\u7684Web\u4eea\u8868\u677f\uff0c\u53ef\u7528\u4e8e\u53ef\u89c6\u5316\u7cfb\u7edf\u4e0a\u7684\u8fdb\u7a0b\u548c\u670d\u52a1\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

Netdata\u662f\u4e00\u4e2a\u514d\u8d39\u7684\uff0c\u5f00\u6e90\u7684\uff0c\u53ef\u6269\u5c55\u7684\uff0c\u5206\u5e03\u5f0f\u7684\uff0c\u5b9e\u65f6\u7684\uff0c\u6027\u80fd\u548c\u5065\u5eb7\u76d1\u6d4b\u5de5\u5177\uff0c\u7528\u4e8e\u57fa\u4e8eLinux\u7684\u64cd\u4f5c\u7cfb\u7edf\u3002 Netdata\u9644\u5e26\u7b80\u5355\uff0c\u6613\u7528\u4e14\u53ef\u6269\u5c55\u7684Web\u4eea\u8868\u677f\uff0c\u53ef\u7528\u4e8e\u53ef\u89c6\u5316\u7cfb\u7edf\u4e0a\u7684\u8fdb\u7a0b\u548c\u670d\u52a1\u3002 \u60a8\u53ef\u4ee5\u4f7f\u7528Netdata\u76d1\u63a7CPU\uff0cRAM\u4f7f\u7528\u60c5\u51b5\uff0c\u78c1\u76d8I\/O\uff0c\u7f51\u7edc\u6d41\u91cf\u548cPostfix\u3002 Netdata\u53ef\u5728\u6240\u6709\u7cfb\u7edf\u4e0a\u8fd0\u884c\uff0c\u5982\u7269\u7406\u673a\uff0c\u865a\u62df\u673a\uff0c\u5bb9\u5668\u548c\u7269\u8054\u7f51\u8bbe\u5907\uff0c\u800c\u4e0d\u4f1a\u4e2d\u65ad\u5176\u6838\u5fc3\u529f\u80fd\u3002<\/p>\n

Netdata\u9644\u5e26\u5f88\u591a\u529f\u80fd\uff0c\u5176\u4e2d\u4e00\u4e9b\u5217\u51fa\u5982\u4e0b\uff1a<\/p>\n

    \n
  • \u4ee4\u4eba\u60ca\u53f9\u7684\u4ea4\u4e92\u5f0f\u5f15\u5bfc\u4eea\u8868\u677f\u3002<\/li>\n
  • \u652f\u6301\u52a8\u6001\u9608\u503c\uff0c\u8b66\u62a5\u6a21\u677f\uff0c\u6ede\u540e\u548c\u591a\u79cd\u57fa\u4e8e\u89d2\u8272\u7684\u901a\u77e5\u65b9\u6cd5\u3002<\/li>\n
  • \u60a8\u53ef\u4ee5\u4f7f\u7528HTML\u8f7b\u677e\u6784\u5efa\u81ea\u5b9a\u4e49\u4eea\u8868\u677f\u3002<\/li>\n
  • \u6bcf\u4e2a\u670d\u52a1\u5668\u6bcf\u79d2\u6536\u96c6\u6570\u5343\u4e2a\u6307\u6807\uff0c\u53ea\u67091\uff05\u7684CPU\u5229\u7528\u7387\u3002<\/li>\n
  • \u5b83\u76d1\u63a7CPU\uff0c\u5185\u5b58\uff0c\u78c1\u76d8\uff0cIptables\uff0c\u8fdb\u7a0b\uff0c\u7f51\u7edc\u63a5\u53e3\uff0cNFS\u670d\u52a1\u5668\uff0cApache\u670d\u52a1\u5668\uff0cRedis\u6570\u636e\u5e93\uff0cPostgres\u6570\u636e\u5e93\uff0cMySQL\u6570\u636e\u5e93\uff0cTomcat\uff0cPostfix\u548cExim\u90ae\u4ef6\u670d\u52a1\u5668\uff0cSNMP\u8bbe\u5907\uff0cSquid\u4ee3\u7406\u670d\u52a1\u5668\u7b49\u51e0\u4e4e\u6240\u6709\u4e1c\u897f\u3002\u8fd8\u6709\u5f88\u591a\u3002<\/li>\n<\/ul>\n

    \u5728\u672c\u6559\u7a0b\u4e2d\uff0c\u6211\u4eec\u5c06\u5b66\u4e60\u5982\u4f55\u5728Debian 9\u4e0a\u5b89\u88c5Netdata Performance Monitoring\u5de5\u5177\u3002<\/p>\n

    \u8981\u6c42<\/strong><\/div>\n

    Debian 9\u684c\u9762\/\u670d\u52a1\u5668\u5b89\u88c5\u5728\u60a8\u7684\u7cfb\u7edf\u4e0a\u3002
    \n \u5177\u6709sudo\u6743\u9650\u7684\u975eroot\u7528\u6237\u3002<\/p>\n

    \u5165\u95e8<\/strong><\/div>\n

    \u5f00\u59cb\u4e4b\u524d\uff0c\u60a8\u9700\u8981\u5b89\u88c5\u4e00\u4e9b\u5b89\u88c5Netdata\u6240\u9700\u7684\u8f6f\u4ef6\u5305\u3002<\/p>\n

    \u9996\u5148\uff0c\u901a\u8fc7\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u66f4\u65b0\u8f6f\u4ef6\u5305\u5b58\u50a8\u5e93\uff1a<\/p>\n

    \r\nsudo apt-get update -y  \r\nsudo apt-get upgrade -y \r\n<\/pre>\n

    \u63a5\u4e0b\u6765\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\u6240\u6709\u5fc5\u9700\u7684\u4f9d\u8d56\u9879\uff1a<\/p>\n

    \r\nsudo apt-get install zlib1g-dev uuid-dev libmnl-dev pkg-config curl gcc make autoconf autoconf-archive autogen automake python python-yaml python-mysqldb nodejs lm-sensors python-psycopg2 netcat git -y \r\n<\/pre>\n

    \u4e00\u65e6\u5b89\u88c5\u4e86\u6240\u6709\u8f6f\u4ef6\u5305\uff0c\u5c31\u53ef\u4ee5\u7ee7\u7eed\u4e0b\u4e00\u6b65\u3002<\/p>\n

    \u5b89\u88c5Netdata<\/strong><\/div>\n

    \u5148\uff0c\u4eceGit\u5b58\u50a8\u5e93\u4e0b\u8f7d\u6700\u65b0\u7248\u672c\u7684Netdata\u3002 \u60a8\u53ef\u4ee5\u901a\u8fc7\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u6267\u884c\u6b64\u64cd\u4f5c\uff1a<\/p>\n

    git clone https:\/\/github.com\/firehol\/netdata.git --depth=1 ~\/netdata <\/pre>\n

    \u63a5\u4e0b\u6765\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5c06\u76ee\u5f55\u66f4\u6539\u4e3a\u514b\u9686\u7684\u76ee\u5f55\uff1a<\/p>\n

    cd netdata <\/pre>\n

    \u63a5\u4e0b\u6765\uff0c\u901a\u8fc7\u8fd0\u884cnetdata-installer.sh\u811a\u672c\u6765\u5b89\u88c5Netdata\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n

    \r\nsudo .\/netdata-installer.sh\r\n<\/pre>\n

    \u60a8\u5e94\u8be5\u770b\u5230\u4ee5\u4e0b\u8f93\u51fa\uff1a<\/p>\n

    \r\n    ^ \r\n     \r\n      |.-.   .-.   .-.   .-.   .  netdata                                         \r\n     \r\n      |   '-'   '-'   '-'   '-'   real-time performance monitoring, done right!   \r\n     \r\n      +----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+---> \r\n     \r\n      You are about to build and install netdata to your system. \r\n     \r\n      It will be installed at these locations: \r\n     \r\n       - the daemon     at \/usr\/sbin\/netdata \r\n     \r\n       - config files   in \/etc\/netdata \r\n     \r\n       - web files      in \/usr\/share\/netdata \r\n     \r\n       - plugins        in \/usr\/libexec\/netdata \r\n     \r\n       - cache files    in \/var\/cache\/netdata \r\n     \r\n       - db files       in \/var\/lib\/netdata \r\n     \r\n       - log files      in \/var\/log\/netdata \r\n     \r\n       - pid file       at \/var\/run\/netdata.pid \r\n     \r\n       - logrotate file at \/etc\/logrotate.d\/netdata  \r\n     \r\n     \r\n      This installer allows you to change the installation path. \r\n     \r\n      Press Control-C and run the same command with --help for help.  \r\n     \r\n     \r\n    Press ENTER to build and install netdata to your system >   \r\n<\/pre>\n

    \u73b0\u5728\uff0c\u6309Enter\u7ee7\u7eed\u5b89\u88c5\u3002 \u5b89\u88c5\u6210\u529f\u5b8c\u6210\u540e\uff0c\u60a8\u5e94\u8be5\u770b\u5230\u4ee5\u4e0b\u8f93\u51fa\uff1a<\/p>\n

    \r\n--- We are done! ---  \r\n \r\n ^ \r\n \r\n |.-.   .-.   .-.   .-.   .-.   .  netdata                          .-.   .- \r\n \r\n |   '-'   '-'   '-'   '-'   '-'   is installed and running now!  -'   '-'   \r\n \r\n +----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+---> \r\n \r\n enjoy real-time performance and health monitoring... \r\n<\/pre>\n

    \u60a8\u53ef\u4ee5\u901a\u8fc7\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u542f\u52a8\uff0c\u505c\u6b62\u5e76\u83b7\u53d6Netdata\u670d\u52a1\u7684\u72b6\u6001\uff1a<\/p>\n

    \r\nsudo systemctl start netdata  \r\nsudo systemctl stop netdata  \r\nsudo systemctl status netdata\r\n<\/pre>\n

    \u5982\u679cNetdata\u8fd0\u884c\u6b63\u5e38\uff0c\u60a8\u5e94\u8be5\u770b\u5230\u4ee5\u4e0b\u8f93\u51fa\uff1a<\/p>\n

    \r\n    ? netdata.service - Real time performance monitoring \r\n     \r\n       Loaded: loaded (\/etc\/systemd\/system\/netdata.service; enabled; vendor preset: enabled) \r\n     \r\n       Active: active (running) since Sat 2018-02-10 11:19:29 EST; 18min ago \r\n     \r\n      Process: 575 ExecStartPre=\/bin\/chown -R netdata:netdata \/var\/cache\/netdata (code=exited, status=0\/SUCCESS) \r\n     \r\n      Process: 574 ExecStartPre=\/bin\/mkdir -p \/var\/cache\/netdata (code=exited, status=0\/SUCCESS) \r\n     \r\n     Main PID: 580 (netdata) \r\n     \r\n        Tasks: 17 (limit: 4915) \r\n     \r\n       CGroup: \/system.slice\/netdata.service \r\n     \r\n               ??580 \/usr\/sbin\/netdata -P \/run\/netdata\/netdata.pid -D \r\n     \r\n               ??600 bash \/usr\/libexec\/netdata\/plugins.d\/tc-qos-helper.sh 1 \r\n     \r\n               ??612 \/usr\/libexec\/netdata\/plugins.d\/apps.plugin 1 \r\n     \r\n               ??613 \/usr\/bin\/python \/usr\/libexec\/netdata\/plugins.d\/python.d.plugin 1 \r\n     \r\n     \r\n     \r\n    Feb 10 11:19:27 Netdataserver systemd[1]: Starting Real time performance monitoring... \r\n     \r\n    Feb 10 11:19:29 Netdataserver systemd[1]: Started Real time performance monitoring.  \r\n<\/pre>\n
    \u914d\u7f6e\u9632\u706b\u5899<\/strong><\/div>\n

    Netdata\u5728\u7aef\u53e319999\u4e0a\u8fd0\u884c\uff0c\u56e0\u6b64\u60a8\u9700\u8981\u901a\u8fc7UFW\u9632\u706b\u5899\u5141\u8bb8\u7aef\u53e319999 \u3002 \u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cUFW\u672a\u5b89\u88c5\u5728Debian 9\u4e2d\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u5b89\u88c5\u5b83\uff1a<\/p>\n

    sudo apt-get install ufw -y <\/pre>\n

    \u4e00\u65e6\u5b89\u88c5\u4e86UFW\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u542f\u7528\u5b83\uff1a<\/p>\n

    sudo ufw enable <\/pre>\n

    \u63a5\u4e0b\u6765\uff0c\u5141\u8bb8\u4f7f\u7528UFW\u9632\u706b\u5899\u7684\u7aef\u53e319999\u5982\u4e0b\uff1a<\/p>\n

    sudo ufw allow 19999\/tcp <\/pre>\n

    \u63a5\u4e0b\u6765\uff0c\u91cd\u65b0\u52a0\u8f7d\u9632\u706b\u5899\u4ee5\u5e94\u7528\u6240\u6709\u66f4\u6539\uff1a<\/p>\n

    \r\nsudo ufw reload \r\n<\/pre>\n

    \u4e00\u65e6\u914d\u7f6e\u4e86UFW\u9632\u706b\u5899\uff0c\u60a8\u5c31\u53ef\u4ee5\u7ee7\u7eed\u8bbf\u95eeNetdata Web\u754c\u9762\u3002<\/p>\n

    \u8bbf\u95eeNetdata Web\u754c\u9762<\/strong><\/div>\n

    \u6253\u5f00\u60a8\u7684\u7f51\u7edc\u6d4f\u89c8\u5668\u5e76\u8f93\u5165URL http\uff1a\/\/ your-server-ip\uff1a19999 \uff0c\u60a8\u5c06\u88ab\u91cd\u5b9a\u5411\u5230Netdata\u4eea\u8868\u677f\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n

    CPU\u4f7f\u7528\u7387\uff1a
    \n\"\"<\/p>\n

    \u8d1f\u8f7d\u548c\u78c1\u76d8I \/ O\uff1a
    \n\"\"<\/p>\n

    \u5185\u5b58\u4f7f\u7528\u60c5\u51b5\uff1a
    \n\"\"<\/p>\n

    IPv4\u7f51\u7edc\uff1a
    \n\"\"<\/p>\n

    \u78c1\u76d8\u4f7f\u7528\u60c5\u51b5\uff1a
    \n\"\"<\/p>\n

    \u60a8\u4e5f\u53ef\u4ee5\u901a\u8fc7\u8f93\u5165URL http\uff1a\/\/ your-server-ip\uff1a19999 \/ netdata.conf\u5728\u6d4f\u89c8\u5668\u4e2d\u67e5\u770bNetdata\u7684\u5f53\u524d\u914d\u7f6e\u3002 \u60a8\u5e94\u8be5\u770b\u5230\u4ee5\u4e0b\u9875\u9762\uff1a
    \n\"\"<\/p>\n

    \u5728\u4e0a\u56fe\u4e2d\uff0c\u60a8\u5e94\u8be5\u770b\u5230\u6240\u6709\u53ef\u914d\u7f6e\u9009\u9879\u90fd\u88ab\u6ce8\u91ca\u6389\u4e86\u3002 \u60a8\u53ef\u4ee5\u901a\u8fc7\u7f16\u8f91\/etc\/netdata\/netdata.conf\u6587\u4ef6\u6765\u6839\u636e\u9700\u8981\u5bf9\u5176\u8fdb\u884c\u914d\u7f6e\u3002<\/p>\n

    \u66f4\u65b0\u548c\u5378\u8f7dNetdata<\/strong><\/div>\n

    \u5982\u679c\u60a8\u60f3\u4ece\u7cfb\u7edf\u4e2d\u5220\u9664Netdata\uff0c\u5219\u53ef\u4ee5\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

    \r\ncd netdata  \r\nsudo \/netdata-uninstaller.sh --force \r\n<\/pre>\n

    \u5982\u679c\u8981\u901a\u8fc7\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5c06Netdata\u66f4\u65b0\u4e3a\u6700\u65b0\u7248\u672c\uff1a<\/p>\n

    cd netdata  \r\ngit pull  \r\nsudo .\/netdata-installer.sh<\/pre>\n

    \u606d\u559c\uff01 \u60a8\u5df2\u7ecf\u5728Debian 9\u4e0a\u6210\u529f\u5b89\u88c5Netdata\u3002<\/p>\n

    \n

    \u539f\u6587\u6765\u81ea\uff1ahttp:\/\/os.51cto.com\/art\/201802\/566769.htm<\/a><\/p>\n

    \u672c\u6587\u5730\u5740\uff1ahttps:\/\/lrxjmw.cn\/debian-9-netdata.html<\/a>\u7f16\u8f91\uff1a\u70e8\u5b50\uff0c\u5ba1\u6838\u5458\uff1a\u9004\u589e\u5b9d<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

    \u5bfc\u8bfb Netdata\u662f\u4e00\u4e2a\u514d\u8d39\u7684\uff0c\u5f00\u6e90\u7684\uff0c\u53ef\u6269\u5c55\u7684\uff0c\u5206\u5e03\u5f0f\u7684\uff0c\u5b9e\u65f6\u7684\uff0c\u6027\u80fd\u548c\u5065\u5eb7\u76d1\u6d4b\u5de5\u5177\uff0c\u7528\u4e8e\u57fa\u4e8eLinux\u7684 […]<\/p>\n","protected":false},"author":63,"featured_media":93586,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-96174","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/96174","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=96174"}],"version-history":[{"count":3,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/96174\/revisions"}],"predecessor-version":[{"id":291657,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/96174\/revisions\/291657"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/93586"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=96174"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=96174"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=96174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}