{"id":19523,"date":"2017-04-20T06:35:48","date_gmt":"2017-04-19T22:35:48","guid":{"rendered":"https:\/\/2blog.ilc.edu.tw\/25793\/2017\/04\/20\/%e5%9c%a8-centos-7-x-%e4%b8%8a%e5%ae%89%e8%a3%9d-ntopng\/"},"modified":"2021-03-18T17:25:00","modified_gmt":"2021-03-18T09:25:00","slug":"%e5%9c%a8-centos-7-x-%e4%b8%8a%e5%ae%89%e8%a3%9d-ntopng","status":"publish","type":"post","link":"https:\/\/2blog.ilc.edu.tw\/25793\/2017\/04\/20\/%e5%9c%a8-centos-7-x-%e4%b8%8a%e5%ae%89%e8%a3%9d-ntopng\/","title":{"rendered":"\u5728 CentOS 7.x \u4e0a\u5b89\u88dd ntopng"},"content":{"rendered":"<p>ntopng \u5b98\u65b9\u7db2\u7ad9\uff1a<a href=\"http:\/\/www.ntop.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/www.ntop.org\/<\/a> <br \/>ntop \u662f\u4e00\u5957\u597d\u7528\u7684\u5716\u5f62\u5316\u4ecb\u9762\u7db2\u8def\u8edf\u9ad4\uff0c\u53ef\u4ee5\u76e3\u63a7\u4e26\u8a18\u9304\u6574\u500b\u7db2\u8def\u7684\u6d41\u91cf\u3002ntopng \u5247\u662f ntop \u7684\u4e0b\u4e00\u500b\u7248\u672c\u3002 <\/p>\n<p>\u53c3\u8003\u7db2\u9801\uff1a <br \/><a href=\"https:\/\/blog.aiso.idv.tw\/2016\/08\/609\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u3010 Linux \u3011NTopNG\u5b89\u88dd (CentOS 7) \u2013 \u4e9e\u7d22\u6578\u4f4d\u7b46\u8a18<\/a> <br \/> <a href=\"http:\/\/blog.xuite.net\/beavisliu\/blog\/475222011-CentOs+7+ntopng+%E5%AE%89%E8%A3%9D\" target=\"_blank\" rel=\"noopener noreferrer\">CentOs 7 ntopng \u5b89\u88dd @ \u5de5\u4f5c\u96dc\u8a18 :: \u96a8\u610f\u7aa9 Xuite\u65e5\u8a8c<\/a><\/p>\n<p>1. \u5b89\u88dd epel \u5957\u4ef6\u5eab <br \/># <span style=\"color: #ff0000\">yum install epel-release<\/span> <\/p>\n<p>2. \u65b0\u589e ntop \u5957\u4ef6\u5eab\u8a2d\u5b9a\u6a94 <br \/># <span style=\"color: #ff0000\">vim \/etc\/yum.repos.d\/ntop-nmon.repo<\/span> <br \/><span style=\"color: #0000ff\">[ntop]<\/span> <br \/><span style=\"color: #0000ff\">name=ntop packages<\/span> <br \/><span style=\"color: #0000ff\">baseurl=http:\/\/www.nmon.net\/centos-stable\/$releasever\/$basearch\/<\/span> <br \/><span style=\"color: #0000ff\">enabled=1<\/span> <br \/><span style=\"color: #0000ff\">gpgcheck=1<\/span> <br \/><span style=\"color: #0000ff\">gpgkey=http:\/\/www.nmon.net\/centos-stable\/RPM-GPG-KEY-deri<\/span> <\/p>\n<p><span style=\"color: #0000ff\">[ntop-noarch]<\/span> <br \/><span style=\"color: #0000ff\">name=ntop packages<\/span> <br \/><span style=\"color: #0000ff\">baseurl=http:\/\/www.nmon.net\/centos-stable\/$releasever\/noarch\/<\/span> <br \/><span style=\"color: #0000ff\">enabled=1<\/span> <br \/><span style=\"color: #0000ff\">gpgcheck=1<\/span> <br \/><span style=\"color: #0000ff\">gpgkey=http:\/\/www.nmon.net\/centos-stable\/RPM-GPG-KEY-deri<\/span> <\/p>\n<p>\u6e05\u9664\u820a\u7684\u66ab\u5b58\u4e26\u66f4\u65b0\u5957\u4ef6\u5eab\u5957\u4ef6\u8cc7\u8a0a <br \/># <span style=\"color: #ff0000\">yum clean all<\/span> <br \/># <span style=\"color: #ff0000\">yum update<\/span>[@more@] <br \/>3. \u5b89\u88dd ntopng \u76f8\u95dc\u5957\u4ef6 <br \/># <span style=\"color: #ff0000\">yum install pfring n2disk nprobe ntopng ntopng-data cento nbox<\/span> <\/p>\n<p>\u5b89\u88dd PF_RING \u9a45\u52d5\u7a0b\u5f0f <br \/># <span style=\"color: #ff0000\">yum install pfring-drivers-zc-dkms<\/span> <\/p>\n<p>4. \u8a2d\u5b9a\u958b\u6a5f\u6642\u555f\u52d5 ntopng \u76f8\u95dc\u670d\u52d9 <br \/># <span style=\"color: #ff0000\">systemctl start redis.service<\/span> <br \/># <span style=\"color: #ff0000\">systemctl enable redis.service<\/span> <\/p>\n<p># <span style=\"color: #ff0000\">systemctl start ntopng.service<\/span> <br \/># <span style=\"color: #ff0000\">systemctl enable ntopng.service<\/span> <\/p>\n<p>5. \u52a0\u5165\u9632\u706b\u7246\u8a2d\u5b9a <br \/>#<span style=\"color: #ff0000\"> firewall-cmd &#8211;permanent &#8211;add-port=3000\/tcp<\/span> <br \/># <span style=\"color: #ff0000\">firewall-cmd &#8211;reload<\/span> <br \/>\u6216 <br \/># <span style=\"color: #ff0000\">iptables -A INPUT -p tcp &#8211;syn -m state &#8211;state NEW &#8211;dport 3000 -j ACCEPT<\/span> <\/p>\n<p>6. \u6aa2\u67e5\u662f\u5426\u6709\u6b63\u5e38\u555f\u52d5 <br \/># <span style=\"color: #ff0000\">systemctl status ntopng.service<\/span> <br \/><span style=\"color: #0000ff\">\u25cf ntopng.service &#8211; Start\/stop ntopng program<\/span> <br \/><span style=\"color: #0000ff\">\u00a0\u00a0 Loaded: loaded (\/etc\/systemd\/system\/ntopng.service; enabled; vendor preset: disabled)<\/span> <br \/><span style=\"color: #0000ff\">\u00a0\u00a0 Active: active (<\/span><span style=\"color: #ff0000\">running<\/span><span style=\"color: #0000ff\">) since Wed 2017-03-01 21:34:25 CST; 3s ago<\/span> <br \/><span style=\"color: #0000ff\">\u00a0 Process: 12500 ExecStop=\/etc\/systemd\/scripts\/ntopng stop (code=exited, status=0\/SUCCESS)<\/span> <br \/><span style=\"color: #0000ff\">\u00a0 Process: 12560 ExecStart=\/etc\/systemd\/scripts\/ntopng start (code=exited, status=0\/SUCCESS)<\/span> <br \/><span style=\"color: #0000ff\">\u00a0Main PID: 12567 (ntopng)<\/span> <br \/><span style=\"color: #0000ff\">\u00a0\u00a0 CGroup: \/system.slice\/ntopng.service<\/span> <br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 mq12567 \/usr\/bin\/ntopng \/etc\/ntopng\/ntopng.conf<\/span> <\/p>\n<p><span style=\"color: #0000ff\">Mar 01 21:34:24 flow logger[12561]: ntopng start<\/span> <br \/><span style=\"color: #0000ff\">Mar 01 21:34:24 flow ntopng[12560]: Starting ntopng: No network card detected<\/span> <br \/><span style=\"color: #0000ff\">Mar 01 21:34:24 flow ntopng[12567]: [NtopPro.cpp:182]<\/span> <span style=\"color: #ff0000\">ERROR: [LICENSE] Invalid or missing ntopng License [Empty license file]<\/span> <br \/><span style=\"color: #0000ff\">Mar 01 21:34:24 flow ntopng[12567]: [NtopPro.cpp:195]<\/span> <span style=\"color: #ff0000\">WARNING<\/span>:<span style=\"color: #0000ff\"> [LICENSE] ntopng will now run in pro mode for 10 minutes<\/span> <br \/><span style=\"color: #0000ff\">Mar 01 21:34:24 flow ntopng[12567]: [NtopPro.cpp:197]<\/span> <span style=\"color: #ff0000\">WARNING<\/span>: <span style=\"color: #0000ff\">[LICENSE] before returning to community mode<\/span> <br \/><span style=\"color: #0000ff\">Mar 01 21:34:24 flow ntopng[12567]: [NtopPro.cpp:198]<\/span> <span style=\"color: #ff0000\">WARNING<\/span>: <span style=\"color: #0000ff\">[LICENSE] You can buy a permanent license at http:\/\/shop.ntop.org<\/span> <br \/><span style=\"color: #0000ff\">Mar 01 21:34:24 flow ntopng[12567]: [NtopPro.cpp:199]<\/span> <span style=\"color: #ff0000\">WARNING:<\/span> <span style=\"color: #0000ff\">[LICENSE] or run ntopng in community mode starting<\/span> <br \/><span style=\"color: #0000ff\">Mar 01 21:34:24 flow ntopng[12567]: [NtopPro.cpp:200]<\/span> <span style=\"color: #ff0000\">WARNING:<\/span><span style=\"color: #0000ff\"> [LICENSE] ntopng &#8211;community<\/span> <br \/><span style=\"color: #0000ff\">Mar 01 21:34:25 flow ntopng[12560]: [\u00a0 OK\u00a0 ]<\/span> <br \/><span style=\"color: #0000ff\">Mar 01 21:34:25 flow systemd[1]: Started Start\/stop ntopng program.<\/span> <\/p>\n<p>\u6709\u6b63\u5e38\u555f\u52d5\uff0c\u4f46\u6709 <span style=\"color: #ff0000\">ERROR<\/span> \u548c\u4e00\u4e9b <span style=\"color: #ff0000\">WARNING<\/span> <\/p>\n<p>\u89e3\u6c7a\u65b9\u5f0f\uff1a <br \/># <span style=\"color: #ff0000\">echo &#8220;&#8211;community&#8221; &gt;&gt; \/etc\/ntopng\/ntopng.conf<\/span> <\/p>\n<p>7. \u91cd\u65b0\u555f\u52d5 ntopng \u670d\u52d9 <br \/># <span style=\"color: #ff0000\">systemctl restart ntopng.service<\/span> <\/p>\n<p>8. \u5df2\u6b63\u5e38\u7121 WARNING \u8b66\u544a\u8a0a\u606f <br \/># <span style=\"color: #ff0000\">systemctl status ntopng.service<\/span> <br \/><span style=\"color: #0000ff\">\u25cf ntopng.service &#8211; Start\/stop ntopng program<\/span> <br \/><span style=\"color: #0000ff\">\u00a0\u00a0 Loaded: loaded (\/etc\/systemd\/system\/ntopng.service; enabled; vendor preset: disabled)<\/span> <br \/><span style=\"color: #0000ff\">\u00a0\u00a0 Active: active (<\/span><span style=\"color: #ff0000\">running<\/span><span style=\"color: #0000ff\">) since Wed 2017-03-01 21:37:19 CST; 2s ago<\/span> <br \/><span style=\"color: #0000ff\">\u00a0 Process: 12604 ExecStop=\/etc\/systemd\/scripts\/ntopng stop (code=exited, status=0\/SUCCESS)<\/span> <br \/><span style=\"color: #0000ff\">\u00a0 Process: 12659 ExecStart=\/etc\/systemd\/scripts\/ntopng start (code=exited, status=0\/SUCCESS)<\/span> <br \/><span style=\"color: #0000ff\">\u00a0Main PID: 12666 (ntopng)<\/span> <br \/><span style=\"color: #0000ff\">\u00a0\u00a0 CGroup: \/system.slice\/ntopng.service<\/span> <br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 mq12666 \/usr\/bin\/ntopng \/etc\/ntopng\/ntopng.conf<\/span> <\/p>\n<p><span style=\"color: #0000ff\">Mar 01 21:37:18 flow systemd[1]: Starting Start\/stop ntopng program&#8230;<\/span> <br \/><span style=\"color: #0000ff\">Mar 01 21:37:18 flow logger[12660]: ntopng start<\/span> <br \/><span style=\"color: #0000ff\">Mar 01 21:37:18 flow ntopng[12659]: Starting ntopng: No network card detected<\/span> <br \/><span style=\"color: #0000ff\">Mar 01 21:37:19 flow ntopng[12659]: [\u00a0 OK\u00a0 ]<\/span> <br \/><span style=\"color: #0000ff\">Mar 01 21:37:19 flow systemd[1]: Started Start\/stop ntopng program.<\/span> <\/p>\n<p>9. \u958b\u555f\u700f\u89bd\u5668\uff0c\u5728\u7db2\u5740\u5217\u8f38\u5165 <span style=\"color: #ff0000\">http:\/\/Server&#8217;IP:3000<\/span> <\/p>\n<p>\u9810\u8a2d\u767b\u5165\u7684\u5e33\u865f \/ \u5bc6\u78bc\uff1a<span style=\"color: #ff0000\">admin<\/span> \/ <span style=\"color: #ff0000\">admin<\/span> <br \/> <a id=\"res_3785519\" href=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/25793-3785519.png\"> <img decoding=\"async\" src=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/previews-med\/25793-3785519.png\" border=\"0\" alt=\"\" \/> <\/a><\/p>\n<p>\u5176\u5b83\u8a2d\u5b9a <span style=\"color: #0000ff\">\/etc\/ntopng\/ntopng.conf<\/span><br \/><span style=\"color: #0000ff\">&#8211;http-port xxxx <\/span><br \/><span style=\"color: #0000ff\">&#8211;local-networks &#8220;XXX.XXX.XXX.XXX&#8221; \u7db2\u6bb5\uff1a\u4f8b\u5982:192.168.0.0\/24<\/span><br \/><span style=\"color: #0000ff\">&#8211;interface \u7db2\u8def\u4ecb\u9762\uff0c\u4f8b\u5982\uff1aeth0 eth1 enp6s0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ntopng \u5b98\u65b9\u7db2\u7ad9\uff1ahttp:\/\/www.ntop.org\/ ntop \u662f\u4e00\u5957\u597d\u7528\u7684\u5716\u5f62\u5316\u4ecb\u9762\u7db2\u8def\u8edf\u9ad4\uff0c\u53ef &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/2blog.ilc.edu.tw\/25793\/2017\/04\/20\/%e5%9c%a8-centos-7-x-%e4%b8%8a%e5%ae%89%e8%a3%9d-ntopng\/\" class=\"more-link\">\u95b1\u8b80\u5168\u6587<span class=\"screen-reader-text\">\u3008\u5728 CentOS 7.x \u4e0a\u5b89\u88dd ntopng\u3009<\/span><\/a><\/p>\n","protected":false},"author":55,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[117,198],"tags":[],"class_list":["post-19523","post","type-post","status-publish","format-standard","hentry","category-c-78462","category-c-105226"],"meta_key":{"_pingme":["1"],"_encloseme":["1"],"lt_post_id":["687452"]},"_links":{"self":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/19523"}],"collection":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/comments?post=19523"}],"version-history":[{"count":1,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/19523\/revisions"}],"predecessor-version":[{"id":21038,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/19523\/revisions\/21038"}],"wp:attachment":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/media?parent=19523"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/categories?post=19523"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/tags?post=19523"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}