{"id":18258,"date":"2014-04-13T06:20:31","date_gmt":"2014-04-12T22:20:31","guid":{"rendered":"https:\/\/2blog.ilc.edu.tw\/25793\/2014\/04\/13\/%e5%9c%a8-centos-6-x-%e4%b8%8a%e5%ae%89%e8%a3%9d-bandwidthd\/"},"modified":"2021-03-18T17:23:53","modified_gmt":"2021-03-18T09:23:53","slug":"%e5%9c%a8-centos-6-x-%e4%b8%8a%e5%ae%89%e8%a3%9d-bandwidthd","status":"publish","type":"post","link":"https:\/\/2blog.ilc.edu.tw\/25793\/2014\/04\/13\/%e5%9c%a8-centos-6-x-%e4%b8%8a%e5%ae%89%e8%a3%9d-bandwidthd\/","title":{"rendered":"\u5728 CentOS 6.x \u4e0a\u5b89\u88dd BandwidthD"},"content":{"rendered":"<p>BandwidthD \u662f\u4e00\u5957\u53ef\u4ee5\u5728\u5340\u57df\u7db2\u8def\u4e0a\u986f\u793a\u5404\u500b IP \u7db2\u8def\u4f7f\u7528\u60c5\u5f62\u7684\u7a0b\u5f0f\uff0c\u7531 David Hinkle \u6240\u958b\u767c\u3002<br \/><a id=\"res_2444378\" href=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/25793-2444378.png\"><img decoding=\"async\" src=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/previews-med\/25793-2444378.png\" border=\"0\" alt=\"\" \/><\/a><br \/>BandwidthD \u5b98\u65b9\u7db2\u7ad9\uff1a<a href=\"http:\/\/bandwidthd.sourceforge.net\/\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/bandwidthd.sourceforge.net\/<\/a><br \/>\u5e95\u4e0b\u662f\u5728 CentOS 6.x \u4e0b\u5b89\u88dd[@more@]1. \u5b89\u88dd\u7de8\u8b6f\u5957\u4ef6<br \/>#\u00a0<span style=\"color: #ff0000\">yum groupinstall &#8216;Development Tools&#8217; -y<\/span><\/p>\n<p>2. \u5b89\u88dd\u53e6\u5916\u6240\u9808\u5957\u4ef6<br \/># \u00a0<span style=\"color: #ff0000\">yum install\u00a0libpcap-devel libpng-devel gd-devel zlib-devel<\/span><\/p>\n<p>3. \u4e0b\u8f09\u00a0BandwidthD<br \/># <span style=\"color: #ff0000\">wget\u00a0http:\/\/downloads.sourceforge.net\/project\/bandwidthd\/bandwidthd\/bandwidthd%202.0.1\/bandwidthd-2.0.1.tgz<\/span><\/p>\n<p>4. \u89e3\u58d3\u7e2e<br \/># <span style=\"color: #ff0000\">tar xvzf\u00a0bandwidthd-2.0.1.tgz<\/span><\/p>\n<p>5. \u5207\u63db\u76ee\u9304<br \/># <span style=\"color: #ff0000\">cd bandwidthd-2.0.1<\/span><\/p>\n<p>6. \u9032\u884c\u7de8\u53ca\u5b89\u88dd<br \/>#\u00a0<span style=\"color: #ff0000\">.\/configure<\/span><br \/># <span style=\"color: #ff0000\">make<\/span><br \/># <span style=\"color: #ff0000\">make install<\/span><br \/><span style=\"font-size: 1em;color: #0000ff\">\/usr\/bin\/install -c -d \/usr\/local\/bandwidthd\/etc<\/span><br \/><span style=\"color: #0000ff\">\/usr\/bin\/install -c -d \/usr\/local\/bandwidthd\/htdocs<\/span><br \/><span style=\"color: #0000ff\">\/usr\/bin\/install -c -m755 -s bandwidthd \/usr\/local\/bandwidthd<\/span><br \/><span style=\"color: #0000ff\">if [ ! -f \/usr\/local\/bandwidthd\/etc\/bandwidthd.conf ] ; then \/usr\/bin\/install -c \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0-m644 etc\/bandwidthd.conf \/usr\/local\/bandwidthd\/etc\/ ; fi<\/span><br \/><span style=\"color: #0000ff\">\/usr\/bin\/install -c -m644 htdocs\/legend.gif \/usr\/local\/bandwidthd\/htdocs<\/span><br \/><span style=\"color: #0000ff\">\/usr\/bin\/install -c -m644 htdocs\/logo.gif \/usr\/local\/bandwidthd\/htdocs<\/span><\/p>\n<p>7.\u00a0\u9032\u884c\u8a2d\u5b9a<br \/># <span style=\"color: #ff0000\">vim \/etc\/httpd\/conf.d\/bandwidthd.conf<\/span><br \/><span style=\"color: #0000ff\">Alias \/bandwidthd \/usr\/local\/bandwidthd\/htdocs<\/span><br \/><span style=\"color: #0000ff\">&lt;Location \/bandwidthd&gt;<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0 Order deny,allow<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0 Deny from all<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0 Allow from 127.0.0.1 192.168.53.0\/24<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0 Allow from ::1<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0 # Allow from your-workstation.com<\/span><br \/><span style=\"color: #0000ff\">&lt;\/Directory&gt;<\/span><\/p>\n<p>8.\u00a0\u4fee\u6539 BandwidthD\u00a0\u8a2d\u5b9a\u6a94<br \/># <span style=\"color: #ff0000\">vim \/usr\/local\/bandwidthd\/etc\/bandwidthd.conf<\/span><br \/>\u52a0\u5165\u8981\u5075\u6e2c\u7684\u7db2\u6bb5<br \/><span style=\"color: #0000ff\">subnet 192.168.53.0\/24<\/span><br \/>\u52a0\u5165\u8981\u5075\u6e2c\u7684\u7db2\u8def\u5361\u4ee3\u865f<br \/><span style=\"color: #0000ff\">dev &#8220;eth0&#8221;<\/span><\/p>\n<p>9.\u00a0\u57f7\u884c BandwidthD<br \/># <span style=\"color: #ff0000\">\/usr\/local\/bandwidthd\/bandwidthd &amp;<\/span><\/p>\n<p>10.\u00a0\u89c0\u770b\u6210\u679c<br \/><a id=\"res_2444377\" href=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/25793-2444377.png\"><img decoding=\"async\" src=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/previews-med\/25793-2444377.png\" border=\"0\" alt=\"\" \/><\/a><\/p>\n<p>11.\u53ef\u4ee5\u5206\u5225\u5217\u51fa\u6bcf\u4e00\u500b IP\u00a0\u7684\u7db2\u8def\u4f7f\u7528\u60c5\u5f62<br \/><a id=\"res_2444483\" href=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/25793-2444483.png\"><img decoding=\"async\" src=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/previews-med\/25793-2444483.png\" border=\"0\" alt=\"\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>BandwidthD \u662f\u4e00\u5957\u53ef\u4ee5\u5728\u5340\u57df\u7db2\u8def\u4e0a\u986f\u793a\u5404\u500b IP \u7db2\u8def\u4f7f\u7528\u60c5\u5f62\u7684\u7a0b\u5f0f\uff0c\u7531 David Hinkle &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/2blog.ilc.edu.tw\/25793\/2014\/04\/13\/%e5%9c%a8-centos-6-x-%e4%b8%8a%e5%ae%89%e8%a3%9d-bandwidthd\/\" class=\"more-link\">\u95b1\u8b80\u5168\u6587<span class=\"screen-reader-text\">\u3008\u5728 CentOS 6.x \u4e0a\u5b89\u88dd BandwidthD\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],"tags":[],"class_list":["post-18258","post","type-post","status-publish","format-standard","hentry","category-c-78462"],"meta_key":{"_encloseme":["1"],"lt_post_id":["484043"],"_pingme":["1"]},"_links":{"self":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/18258"}],"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=18258"}],"version-history":[{"count":1,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/18258\/revisions"}],"predecessor-version":[{"id":19914,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/18258\/revisions\/19914"}],"wp:attachment":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/media?parent=18258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/categories?post=18258"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/tags?post=18258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}