{"id":115,"date":"2017-06-16T11:41:22","date_gmt":"2017-06-16T03:41:22","guid":{"rendered":"https:\/\/blog.lcsoul.cn\/?p=115"},"modified":"2017-06-16T11:41:22","modified_gmt":"2017-06-16T03:41:22","slug":"centos-%e5%ae%89%e8%a3%85iftop-%e4%bb%a5%e5%8f%8a%e9%81%87%e5%88%b0%e7%9a%84%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"https:\/\/blog.lcsoul.top\/index.php\/2017\/06\/16\/centos-%e5%ae%89%e8%a3%85iftop-%e4%bb%a5%e5%8f%8a%e9%81%87%e5%88%b0%e7%9a%84%e9%97%ae%e9%a2%98\/","title":{"rendered":"centos \u5b89\u88c5iftop \u4ee5\u53ca\u9047\u5230\u7684\u95ee\u9898"},"content":{"rendered":"<p>\u4eca\u5929\u60f3\u76d1\u63a7\u4e0bvps\u7684\u6d41\u91cf \u5f80\u4e0a\u627e\u4e86\u4e0b \u90fd\u662f\u5b89\u88c5iftop\u8fd9\u4e2a\u5de5\u5177 \u7136\u540e\u5c31\u9047\u5230\u5404\u79cd\u95ee\u9898<br \/>\n\u9996\u5148 yum install iftop<br \/>\n\u8fd4\u56de\uff1a<\/p>\n<pre class=\"linenums\" >\nLoaded plugins: fastestmirror\nSetting up Install Process\nLoading mirror speeds from cached hostfile\n * base: mirrors.aliyun.com\n * extras: mirrors.aliyun.com\n * updates: mirrors.aliyun.com\nbase\/primary_db                                                                                         | 4.7 MB     01:26\nextras                                                                                                  | 3.4 kB     00:00\nextras\/primary_db                                                                                       |  29 kB     00:00\nupdates                                                                                                 | 3.4 kB     00:00\nupdates\/primary_db                                                                                      | 1.4 MB     00:01\nNo package iftop available.\nError: Nothing to do\n<\/pre>\n<p>\u65e0\u5948 \u6362\u6210\u963f\u91cc\u4e91\u7684\u6e90 \u95ee\u9898\u4f9d\u65e7 \u53ea\u597d\u7f16\u8bd1\u5b89\u88c5\u4e86<br \/>\n<a href=\"http:\/\/www.ex-parrot.com\/~pdw\/iftop\/\">iftop\u5b98\u7f51<\/a><br \/>\n\u7b2c\u4e00\u6b65 <strong style=\"red\">\u5b89\u88c5\u4f9d\u8d56<\/strong>\uff1a<\/p>\n<pre class=\"prettyprint\">yum install flex byacc libpcap ncurses ncurses-devel libpcap-devel\n<\/pre>\n<p>&nbsp;<br \/>\n\u7b2c\u4e8c\u6b65 \u4e0b\u8f7diftop<\/p>\n<pre  class=\"prettyprint\" >\nwget http:\/\/www.ex-parrot.com\/~pdw\/iftop\/download\/iftop-0.17.tar.gz\ntar zxvf iftop-0.17.tar.gz\ncd iftop-0.17\n.\/configure\nmake &amp;&amp; make install\n<\/pre>\n<p>\u95ee\u9898\uff1a<br \/>\nerror: can&#8217;t find pcap.h<br \/>\nYou&#8217;re not going to get very far without libpcap.<br \/>\n\u9047\u5230\u4e0a\u9762\u4e24\u4e2a\u95ee\u9898 \u8bf7\u5148\u6267\u884c\u7b2c\u4e00\u6b65 \u770b\u770b\u662f\u5426\u6709\u4f9d\u8d56\u6ca1\u6709\u5b89\u88c5 \u53ef\u4ee5\u5c1d\u8bd5\u66f4\u6362\u6e90 \u518d\u6267\u884c<br \/>\n&nbsp;<br \/>\n\u66f4\u6362\u6e90\u7684\u65b9\u6cd5\uff1a<br \/>\n&nbsp;<\/p>\n<pre  class=\"prettyprint\" >\n\/\/\u5907\u4efd\u5f53\u524d\u7684yum\u6e90\nmv \/etc\/yum.repos.d \/etc\/yum.repos.d.backup4comex\n\/\/\u65b0\u5efa\u7a7a\u7684yum\u6e90\u8bbe\u7f6e\u76ee\u5f55\nmkdir \/etc\/yum.repos.d\n\/\/\u4e0b\u8f7d\u963f\u91cc\u4e91\u7684yum\u6e90\u914d\u7f6e\nwget -O \/etc\/yum.repos.d\/CentOS-Base.repo http:\/\/mirrors.aliyun.com\/repo\/Centos-6.repo  \/\/Centos6\u9009\u8fd9\u4e2a\nwget -O \/etc\/yum.repos.d\/CentOS-Base.repo http:\/\/mirrors.aliyun.com\/repo\/Centos-7.repo  \/\/Centos7\u9009\u8fd9\u4e2a\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u5929\u60f3\u76d1\u63a7\u4e0bvps\u7684\u6d41\u91cf \u5f80\u4e0a\u627e\u4e86\u4e0b \u90fd\u662f\u5b89\u88c5iftop\u8fd9\u4e2a\u5de5\u5177 \u7136\u540e\u5c31\u9047\u5230\u5404\u79cd\u95ee\u9898 \u9996\u5148 yum insta [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[45,95,170,182],"class_list":["post-115","post","type-post","status-publish","format-standard","hentry","category-vps","tag-iftop","tag-vps","tag-170","tag-182"],"_links":{"self":[{"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/posts\/115","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/comments?post=115"}],"version-history":[{"count":0,"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/posts\/115\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/media?parent=115"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/categories?post=115"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/tags?post=115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}