{"id":1739,"date":"2013-04-22T21:12:38","date_gmt":"2013-04-22T13:12:38","guid":{"rendered":"http:\/\/www.yewen.us\/blog\/?p=1739"},"modified":"2014-05-23T17:21:47","modified_gmt":"2014-05-23T09:21:47","slug":"optimize-128m-ram-buyvm-vps","status":"publish","type":"post","link":"https:\/\/www.yewen.us\/blog\/2013\/04\/optimize-128m-ram-buyvm-vps\/","title":{"rendered":"BuyVM VPS \u5b89\u88c5\u4f18\u5316\u8bb0"},"content":{"rendered":"<p><strong>BuyVM \u7684 VPS<\/strong><\/p>\n<p>\u65e9\u4e24\u5468\u5fd8\u4e86\u662f\u8c01\u63d0\u9192\u4e86\u4e0b, \u8bf4 buyvm \u5bb6 15$\/yr \u7684 VPS \u6709\u8d27, \u975e\u5e38\u503c\u5f97\u53bb\u62a2, \u5f53\u65f6\u4f30\u7b97\u4e86\u4e0b\u8fd9\u4e2a\u4ef7\u683c\u786e\u5b9e\u7b97\u826f\u5fc3\u4ef7, \u867d\u7136\u53ea\u6709 128M \u5185\u5b58, \u4f46\u4f5c\u4e3a\u4e00\u53f0\u81ea\u5df1\u7684 vps \u6298\u817e\u70b9\u4e1c\u897f\u5b8c\u5168\u90fd\u591f\u4e86\u7684, \u679c\u65ad\u4e0b\u624b\u4e00\u53f0<\/p>\n<p>\u8fd9\u53f0\u673a\u5668\u6253\u7b97\u62ff\u6765\u653e\u4e00\u4e9b\u81ea\u5df1\u73a9\u7684\u5c0f\u7a0b\u5e8f, \u540c\u65f6\u628a\u4e2a\u4eba\u7684\u7a7a\u95f4\u548c blog \u8fc1\u8fc7\u6765, \u672c\u8fd8\u60f3\u62ff\u8fd9\u4e2a\u673a\u5668\u505a\u81ea\u5df1\u79c1\u6709\u7684\u7ffb\u5899\u4e2d\u7ee7, \u4e0d\u8fc7\u8bd5\u4e86\u4e0b\u5230\u672c\u5730\u7684\u901f\u5ea6\u6700\u9ad8\u4e5f\u6ca1\u8d85\u8fc7 30KB\/s \u8fc7, \u9042\u653e\u5f03, \u7b49\u5565\u65f6\u5019\u6709\u70e7\u5305\u9700\u8981\u65f6\u53bb\u4e70 linode \u5728\u65e5\u672c\u7684\u8282\u70b9\u597d\u4e86<\/p>\n<p><strong>\u7cfb\u7edf\u9009\u62e9\u548c\u57fa\u672c\u8bbe\u7f6e<\/strong><\/p>\n<p>\u4e4b\u524d\u81ea\u5df1\u7528 debian-server \u505a\u7eaf\u670d\u52a1\u7aef\u7684\u4e1c\u897f\u611f\u89c9\u5f88\u723d, \u5360\u8d44\u6e90\u5c11\u6587\u6863\u4e30\u5bcc, \u51fa\u70b9\u95ee\u9898\u4e5f\u80fd\u5f88\u5bb9\u6613\u5728 Google \u5e2e\u52a9\u4e0b\u641e\u5b9a, \u6240\u4ee5\u7cfb\u7edf\u4e5f\u9009\u7684 debian, \u7136\u540e\u56e0\u4e3a\u53ea\u6709 128M \u5185\u5b58, \u4e0a 64bit \u6ca1\u610f\u4e49, \u800c\u4e14\u4f1a\u66f4\u8017\u5185\u5b58\u4e00\u70b9, \u6240\u4ee5\u9009\u4e86 32bit \u7684\u7248\u672c<\/p>\n<p>debian \u6709\u51e0\u4e2a\u6bd4\u8f83\u5751\u7239\u7684\u5730\u65b9, \u9996\u5148\u5c31\u662f\u65b0\u5efa\u7528\u6237\u9ed8\u8ba4\u4e0d\u5efa home \u76ee\u5f55, \u975e\u8981\u5728 useradd \u7684\u65f6\u5019\u5f3a\u52a0 -m \u53c2\u6570\u6307\u5b9a, \u4e0d\u7136\u8fd8\u8981\u4eba\u8089\u65b0\u5efa home \u76ee\u5f55\u5175\u628a \/etc\/skel\/ \u4e0b\u7684\u51e0\u4e2a\u9690\u85cf\u6587\u4ef6\u62f7\u8fc7\u6765\u505a\u521d\u59cb\u5316<\/p>\n<p>\u7136\u540e\u5c31\u662f\u5982\u679c\u4e0d\u662f root \u7528\u6237, \/sbin \u548c \/usr\/sbin \u9ed8\u8ba4\u662f\u4e0d\u5728 PATH \u91cc\u7684, \u9700\u8981\u624b\u52a8\u5c06\u8fd9\u4e9b\u8def\u5f84\u6253\u5f00, \u4e0d\u7136\u8fde ifconfig \u4ec0\u4e48\u7684\u90fd\u7528\u4e0d\u4e86. \u4fee\u6539 \/etc\/profile \u91cc, \u5c06 PATH \u8bbe\u6210\u5168\u7528\u6237\u4e00\u81f4 (\u6b64\u5904\u53c2\u8003: <a href=\"http:\/\/techpoet.blogspot.jp\/2010\/01\/add-sbin-to-user-path-in-debian.html\" title=\"Add sbin to user PATH in Debian\" target=\"_blank\">http:\/\/techpoet.blogspot.jp\/2010\/01\/add-sbin-to-user-path-in-debian.html<\/a>)<\/p>\n<p>\u81ea\u5df1\u6709\u4e00\u5806\u5e38\u7528\u7684\u914d\u7f6e\u5e93\u653e\u5728 <a href=\"https:\/\/github.com\/whusnoopy\/whusnoopy\/tree\/master\/shlib\" title=\"snoopy's shell lib\" target=\"_blank\">github<\/a> \u4e0a, \u76f4\u63a5 git \u53d6\u4e0b\u6765\u653e\u5230 home \u76ee\u5f55, \u628a\u4e00\u5806 rc \u7ed3\u5c3e\u7684\u6587\u4ef6\u524d\u9762\u52a0\u70b9\u8ba9\u5bf9\u5e94\u7684\u7a0b\u5e8f\u80fd\u8bfb\u5230. \u7279\u522b\u7684\u662f vimrc, \u6700\u597d\u8fd8\u662f\u653e\u5230 \/etc\/vim\/vimrc.local \u4e0b, \u4e0d\u7136 sudo \u7684\u65f6\u5019\u78b0\u4e0a\u7684\u8fd8\u662f\u6ca1\u914d\u8fc7\u7684 vim, \u633a\u4e0d\u723d\u7684<\/p>\n<p><strong>\u7cfb\u7edf\u81ea\u5e26\u5e94\u7528\u5185\u5b58\u4f18\u5316<\/strong><\/p>\n<p>\u56e0\u4e3a\u53ea\u6709 128M \u7684\u5185\u5b58, \u8981\u505a\u5f88\u591a\u52d2\u7d27\u8170\u5e26\u8fc7\u65e5\u5b50\u7684\u51c6\u5907, \u5148\u5c31\u662f\u5378\u8f7d\u4e00\u5806\u81ea\u5e26\u7684\u670d\u52a1, \u91ca\u653e\u5b9d\u8d35\u7684\u5185\u5b58, \u6b64\u5904\u53c2\u8003\u4e86 <a href=\"http:\/\/www.yyphs.com\/post\/475.html\" title=\"Linux VPS \u7cbe\u7b80debian\u7cfb\u7edf\" target=\"_blank\">http:\/\/www.yyphs.com\/post\/475.html<\/a>, \u4e0d\u8fc7\u6211\u53ea\u53bb\u6389\u4e86\u4f1a\u542f\u52a8\u7684\u7ec4\u4ef6, \u5373\u5982\u4e0b\u64cd\u4f5c<\/p>\n<pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\"># \u7cfb\u7edf\u5347\u7ea7\r\napt-get update &amp;&amp; apt-get upgrade\r\n\r\n# \u53bb\u9664\u591a\u4f59\u8f6f\u4ef6\r\napt-get -y purge apache2-* bind9-* xinetd samba-* nscd-* portmap sendmail-* sasl2-bin\r\n\r\n# \u6e05\u7406\u8f6f\u4ef6\u5305\r\napt-get autoremove &amp;&amp; apt-get clean<\/pre>\n<p><strong>LEMP \u73af\u5883\u5b89\u88c5<\/strong><\/p>\n<p>Web \u5e94\u7528\u4ece\u65e9\u4e24\u5e74\u7684 LAMP \u73b0\u5728\u90fd\u5728\u8f6c LEMP, \u4e3b\u8981\u8fd8\u662f\u628a Apache \u8fd9\u4e2a\u5de8\u65e0\u9738\u6362\u6210\u4e86\u76f8\u5bf9\u5c0f\u5de7\u53c8\u8010\u64cd\u7684 nginx, \u81ea\u5df1\u4e4b\u524d\u7528 nginx \u611f\u89c9\u4e5f\u76f8\u5f53\u597d, \u8fd9\u6b21\u4e5f\u628a\u7cfb\u7edf\u9ed8\u8ba4\u7684 Apache \u5e72\u6389\u6362\u8fd9\u4e2a<\/p>\n<p>\u4e00\u5f00\u59cb\u53c2\u8003\u7684 <a href=\"http:\/\/www.howtoforge.com\/installing-nginx-with-php5-and-mysql-support-on-debian-squeeze\" title=\"Installing Nginx With PHP5 And MySQL Support On Debian Squeeze\" target=\"_blank\">http:\/\/www.howtoforge.com\/installing-nginx-with-php5-and-mysql-support-on-debian-squeeze<\/a>, \u5b89\u88c5 mysql, nginx, php \u90fd\u5f88\u6b63\u5e38, \u4f46\u662f\u8fd9\u91cc\u9762\u63d0\u5230 debian \u6ca1\u6709 php-fpm, \u6240\u4ee5\u7528 lighttpd, \u4e0d\u8fc7\u6211\u88c5 lighttpd \u540e\u5185\u5b58\u7206\u6389, \u968f\u4fbf\u641c\u4e86\u4e0b\u4f18\u5316\u65b9\u6848\u90fd\u641e\u4e0d\u5b9a, \u5378\u6389, \u8fd8\u662f\u7528\u4e60\u60ef\u7684 php-fpm \u65b9\u5f0f\u8dd1 fastcgi<\/p>\n<p>\u6309 <a href=\"http:\/\/www.webhostingtalk.com\/showthread.php?t=1025286\" title=\"nginx + php-fpm + debian squeeze tutorial\" target=\"_blank\">http:\/\/www.webhostingtalk.com\/showthread.php?t=1025286<\/a> \u8fd9\u4e2a\u63d0\u793a\u88c5\u4e0a php5-fpm, \u4ece\u88c5 nginx \u5f00\u59cb\u5c31\u7528\u4e0d\u4e0a\u4e86, \u540e\u9762\u7684\u4f18\u5316\u4e5f\u5148\u4e0d\u7528\u7ba1, \u4e00\u4f1a\u4e00\u8d77\u5904\u7406 (wordpress \u4f3c\u4e4e\u8fd8\u4f9d\u8d56\u4e00\u4e2a\u53eb php5-apc \u7684\u5305, \u88c5\u7684\u65f6\u5019\u4e00\u8d77\u5e26\u4e0a)<\/p>\n<p><strong>\u5185\u5b58\u4f18\u5316<\/strong><\/p>\n<p>\u4e0a\u9762\u90a3\u4e00\u5806\u88c5\u597d\u540e\u5982\u679c\u4e0d\u505a\u4f18\u5316, \u5768\u5768\u7684\u7206\u5185\u5b58, \u6240\u4ee5\u8be5\u5173\u7684\u529f\u80fd\u8981\u5173, \u8be5\u8c03\u7684\u53c2\u8981\u8c03. mysql \u7684\u4e00\u4e2a\u4f18\u5316\u5173\u952e\u662f\u8981\u5173 innodb, \u7136\u540e nginx\/php-fpm\/mysql \u90fd\u8981\u505a\u7684\u4e8b\u5c31\u662f\u964d\u4f4e\u540c\u65f6\u8fd0\u884c\u7684\u5b9e\u4f8b\u6570, \u51cf\u5c11\u8fde\u63a5\u6570, \u540c\u65f6\u4e25\u683c\u63a7\u5236\u5404\u5904\u5185\u5b58\u5927\u5c0f. \u5177\u4f53\u600e\u4e48\u914d\u7684\u4e5f\u5fd8\u4e86, \u4e3b\u8981\u53c2\u8003\u7684\u662f\u641c\u5230\u7684\u8fd9\u4e24\u7bc7\u91cc\u5173\u4e8e\u53c2\u6570\u7684\u914d\u7f6e<\/p>\n<p><a href=\"http:\/\/blog.log4d.com\/2011\/11\/vps-lnmp-setup-config\/\" title=\"128M\u5185\u5b58VPS LNMP\u5b89\u88c5\u4f18\u5316\u5c0f\u8bb0\" target=\"_blank\">http:\/\/blog.log4d.com\/2011\/11\/vps-lnmp-setup-config\/<\/a> (\u4e3b\u8981\u53c2\u8003\u5176\u53c2\u6570\u914d\u7f6e)<\/p>\n<p><a href=\"http:\/\/keithscode.com\/blog\/23-running-mysql-on-a-small-128mb-vps.html\" title=\"Running MySQL Server on a small 128MB VPS\" target=\"_blank\">http:\/\/keithscode.com\/blog\/23-running-mysql-on-a-small-128mb-vps.html<\/a> (\u4e3b\u8981\u53c2\u8003\u5176\u53c2\u6570\u914d\u7f6e)<\/p>\n<p>\u6700\u540e\u7684\u5185\u5b58\u5360\u7528\u5982\u4e0b (\u76ee\u524d\u8fd0\u884c\u72b6\u6001, \u88c5\u4e86 wordpress)<\/p>\n<pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\">$ free\r\n             total       used       free     shared    buffers     cached\r\nMem:        262144      88972     173172          0          0          0\r\n-\/+ buffers\/cache:      88972     173172\r\nSwap:            0          0          0<\/pre>\n<p><strong>\u5b89\u88c5\u8fc1\u79fb wordpress<\/strong><\/p>\n<p>\u5148\u5728 mysql \u91cc\u5efa\u5bf9\u5e94\u7684\u6570\u636e\u5e93, \u8fd9\u4e2a\u968f\u4fbf\u90fd\u80fd\u641c\u5230, \u81ea\u5df1\u78b0\u5230\u4e2a\u5751\u662f mysql \u5206\u914d\u6570\u636e\u5e93\u6743\u9650\u65f6\u7528\u5df2\u6709\u7528\u6237\u65e0\u6cd5\u767b\u9646, \u6700\u540e\u8fd8\u662f\u5220\u6389\u7528\u6237\u5728\u5206\u914d\u6743\u9650\u65f6\u518d\u65b0\u5efa\u7528\u6237, \u7528 identify \u6765\u8bbe\u7f6e\u5bc6\u7801<\/p>\n<pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\">mysql&gt; create database wp;\r\nmysql&gt; grant all privileges on wp.* to wp_user@localhost identified by 'wp_pass';<\/pre>\n<p>\u88c5 wordpress, \u4e00\u5207\u6b63\u5e38, \u7528\u8001\u7684\u6587\u4ef6, \u6539\u540d\u5907\u4efd wp-config.php \u76f4\u63a5\u8bbf\u95ee wp-admin\/install.php<br \/>\n\u7528\u5bfc\u51fa\u7684\u6587\u4ef6\u518d\u5bfc\u5165 (\u5927\u4e8e 2M \u7684\u8bdd\u9700\u8981\u4fee\u6539 php \u7684\u4e0a\u4f20\u9650\u5236: \u4fee\u6539 \/etc\/php5\/fpm\/php.ini \u6587\u4ef6\u4fee\u6539 upload_max_filesize \u9879)<\/p>\n<p>\u4e4b\u524d\u7528\u7684\u662f\u591a\u8bf4\u7684\u8bc4\u8bba\u7cfb\u7edf, \u628a\u63d2\u4ef6\u91cd\u65b0\u542f\u7528, \u5e76\u7ed1\u5b9a\u539f\u6765\u6ce8\u518c\u8fc7\u7684\u7ad9\u70b9\u5c31\u80fd\u5c06\u8bc4\u8bba\u6062\u590d, \u4e00\u5207\u641e\u5b9a<\/p>\n<p><strong>\u5947\u602a\u7684\u95ee\u9898<\/strong><\/p>\n<p>\u4e0a\u9762\u5199\u7684\u597d\u50cf\u5f88\u5bb9\u6613, \u5b9e\u9645\u4e0a\u5bf9\u4e00\u4e2a\u65b0\u624b OP \u6765\u8bf4\u8fd8\u662f\u975e\u5e38\u78d5\u78d5\u78b0\u78b0\u7684, \u6700\u540e\u5728 OP \u4e4b\u5916\u8fd8\u6709\u4e9b\u5947\u602a\u7684\u95ee\u9898<\/p>\n<p>\u5148\u662f\u591a\u8bf4, \u7ed1\u5b9a\u7ad9\u70b9\u65f6\u4e34\u65f6\u6027\u5361\u6b7b, \u7136\u540e\u518d\u5bfc\u6570\u636e\u65f6\u6709\u5ef6\u8fdf, \u518d\u540e\u9762\u5c31\u6709\u91cd\u590d\u7684\u8bc4\u8bba\u51fa\u73b0, \u4f46\u662f\u53c8\u4e0d\u662f\u6240\u6709\u7684\u8bc4\u8bba\u90fd\u88ab\u91cd\u590d\u4e00\u904d, \u7814\u7a76\u4e86\u534a\u5929\u6ca1\u5f04\u660e\u767d, \u81ea\u5df1\u624b\u52a8\u5220\u6389\u4e86\u91cd\u590d\u7684<\/p>\n<p>\u7136\u540e\u5220\u91cd\u590d\u6570\u636e\u65f6\u53d1\u73b0\u6709\u4e00\u6761\u5947\u8469\u7684\u56de\u590d\u663e\u793a\u5728\u4e86\u53e6\u4e00\u7bc7\u6587\u7ae0\u4e0b, \u8fd8\u662f\u4e00\u6761\u4e8c\u7ea7\u8bc4\u8bba, \u4f46\u662f\u5728\u540e\u53f0\u770b\u5bf9\u5e94\u7684\u53c8\u662f\u6b63\u786e\u7684\u6587\u7ae0, \u800c\u4e14\u6587\u7ae0\u4e0b\u7684\u8bc4\u8bba\u6570\u662f\u5bf9\u7684, \u5c31\u662f\u4e0d\u663e\u793a, \u81ea\u5df1\u6298\u817e\u534a\u5929\u90fd\u6ca1\u5f04\u597d, \u65e0\u5948\u53bb\u8054\u7cfb\u591a\u8bf4\u7684\u6280\u672f\u5ba2\u670d, \u5468\u672b\u4e0d\u5728\u7ebf, \u7559\u8a00\u540e\u89c9\u5f97\u4e0d\u653e\u5fc3, \u53c8\u53bb dev.duoshuo.com\/wordpress-plugin \u62a5\u4e86\u4e00\u904d\u624d\u5b89\u5fc3<\/p>\n<p>\u4eca\u5929\u7ec8\u4e8e\u627e\u4e0a\u4eba, \u5e2e\u7740\u770b\u4e86\u4e0b, \u5148\u8ba9\u6211\u628a\u8bc4\u8bba\u6a21\u5f0f\u4ece\u5d4c\u5957\u6539\u6210\u76d6\u697c, \u53d1\u73b0\u679c\u7136\u663e\u793a\u5728\u6b63\u786e\u7684\u6587\u7ae0\u4e0b\u4e86, \u4f46\u662f\u9519\u8bef\u7684\u5f15\u7528\u4e86\u4e00\u6761\u53e6\u4e00\u7bc7\u6587\u7ae0\u4e0b\u7684\u8bc4\u8bba, \u800c\u4e14\u5f15\u7528\u7684\u90a3\u6761\u8bc4\u8bba\u8fd8\u5728\u6b64\u8bc4\u8bba\u540e\u597d\u51e0\u4e2a\u6708\u624d\u53d1\u51fa\u6765, \u987a\u624b\u770b\u4e86\u4e0b HTML \u6e90\u7801, \u53d1\u73b0\u591a\u8bf4\u4e5f\u662f\u6309 \u8bc4\u8bba(post-id), \u6587\u7ae0(thread-id), \u5f15\u7528(root-id) \u6765\u7ec4\u7ec7\u7684\u6570\u636e (\u8fd9\u8ddf BBS \u4e0a\u7684 pid, gid, rid \u4e00\u6837\u4e00\u6837\u554a), \u7136\u540e\u8fd9\u6761\u51fa\u9519\u7684\u8bc4\u8bba\u5e94\u8be5\u662f\u4e24\u8fb9\u54ea\u91cc\u6ca1\u540c\u6b65\u597d, \u5bfc\u81f4\u5176 root-id \u51fa\u9519, \u800c root-id \u5bf9\u5e94\u7684\u8bc4\u8bba\u5728\u53e6\u4e00\u7bc7\u6587\u7ae0\u4e0b, \u6240\u4ee5\u5d4c\u5957\u6a21\u5f0f\u65f6\u5c31\u663e\u793a\u5230\u90a3\u8fb9\u53bb\u4e86, \u800c\u6b63\u786e\u7684\u6587\u7ae0\u4e0b\u56e0\u4e3a\u627e\u4e0d\u5230\u5bf9\u5e94\u7684\u7236\u8bc4\u8bba\u6240\u4ee5\u4e5f\u6ca1\u663e\u793a, \u800c\u76d6\u697c\u6a21\u5f0f\u4e0b\u4e0d\u5224\u65ad\u7236\u8bc4\u8bba\u6240\u4ee5\u80fd\u663e\u793a, \u4f46\u662f\u5b58\u5728\u9519\u8bef\u5f15\u7528\u5173\u7cfb, \u6700\u540e\u8ba9\u5e2e\u5fd9\u624b\u52a8\u5c06\u51fa\u9519\u8bc4\u8bba\u7684 root-id \u7f6e\u96f6, \u603b\u7b97\u641e\u5b9a<\/p>\n<p>\u7b2c\u4e8c\u4ef6\u4e8b\u662f\u4e00\u4e2a\u9648\u5e74\u8001\u95ee\u9898\u8fd8\u5728, \u4e00\u5e74\u591a\u524d\u5c31\u5199\u8fc7\u4e00\u7bc7<a href=\"http:\/\/www.yewen.us\/blog\/2012\/02\/overflow\/\" title=\"\u7206\u6d41\u91cf\u8bb0\" target=\"_blank\">\u7206\u6d41\u91cf\u8bb0<\/a>, \u91cc\u9762\u63d0\u5230\u6709\u4eba\u6293 win7.iso, \u4f46\u662f\u5f53\u65f6\u627e\u4e0d\u5230\u8bc1\u636e\u8bf4\u662f\u8c01, \u8fc1\u5230\u65b0\u7ad9\u540e\u8fd8\u5728\u88ab\u6293, \u671f\u95f4 404\/302\/416 \u8f6e\u7740\u62a5\u4e86\u4e00\u5e74\u591a\u9519\u5c45\u7136\u8fd8\u6293, \u6012\u4e86\u53bb\u770b\u770b\u5230\u5e95\u90fd\u54ea\u6765\u7684\u8bf7\u6c42, \u610f\u5916\u53d1\u73b0\u6709\u5f88\u591a\u6807\u8bc6 QQDownload \u7684\u8bf7\u6c42, \u4ece momodi \u90a3\u8054\u7cfb\u4e0a QQ \u65cb\u98ce\u7684\u4eba, \u8ddf\u4ed6\u4eec blabla \u8bf4\u4e86\u4e00\u5806, \u7ed3\u679c\u4f30\u8ba1\u4ed6\u4eec\u4e5f\u4ece\u6765\u6ca1\u78b0\u5230\u8fc7\u8fd9\u6837\u7684\u4e8b, \u8bf4\u8981\u4e0d\u4f60\u5148\u81ea\u5df1\u5c4f\u853d\u6389? \u6211\u54ed\u7b11\u4e0d\u5f97\u8bf4\u73b0\u5728\u5bf9\u6211\u5012\u6ca1\u5565\u5f71\u54cd\u4e86, \u53cd\u6b63\u5c31\u7b97\u5c4f\u853d\u4e5f\u8017\u7cfb\u7edf\u8d44\u6e90, \u800c\u4e14\u73b0\u5728\u6bcf\u6b21\u7ed9\u4e2a 416 \u4e5f\u8d39\u4e0d\u4e86\u6211\u591a\u5c11\u6d41\u91cf, \u53ea\u662f\u89c9\u5f97\u5f88\u4e0d\u723d\u800c\u5df2. \u4e0d\u8fc7\u540e\u6765\u81ea\u5df1\u53bb\u627e\u4e86\u4e0b\u8fc5\u96f7\u548c\u65cb\u98ce\u79bb\u7ebf\u4e0b\u8f7d\u7684 IP \u6bb5, \u8fd9\u51e0\u4e2a\u597d\u50cf\u53c8\u90fd\u4e0d\u5728\u91cc\u9762, \u8d34\u4e0b\u539f\u59cb\u65e5\u5fd7, \u5927\u5bb6\u770b\u770b\u6709\u5565\u60f3\u6cd5\u6ca1:<\/p>\n<pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\">$ awk '\/QQDownload\/{cnt&#x5B;$1]++};END{for(ip in cnt){print ip, cnt&#x5B;ip]}}' access.log\r\n101.226.68.137 196\r\n140.207.54.139 195\r\n183.195.232.138 196\r\n$ awk '\/cn_windows_7\/{cnt&#x5B;$1]++};END{for(ip in cnt){print ip, cnt&#x5B;ip]}}' access.log\r\n122.141.67.50 329\r\n123.185.52.73 54\r\n14.114.226.18 150\r\n14.114.226.194 14677\r\n14.115.129.55 4040\r\n180.117.68.185 361\r\n59.33.63.137 1476<\/pre>\n<p>\u62bd\u51e0\u6761\u5b8c\u6574\u65e5\u5fd7\u5982\u4e0b:<\/p>\n<blockquote><p>101.226.68.137 &#8211; &#8211; [21\/Apr\/2013:19:44:18 +0800] &#8220;HEAD \/ HTTP\/1.1&#8221; 200 0 &#8220;-&#8221; &#8220;Mozilla\/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident\/4.0; QQDownload 713; .NET CLR 2.0.50727; InfoPath.2)&#8221;<br \/>\n14.115.129.55 &#8211; &#8211; [21\/Apr\/2013:19:44:18 +0800] &#8220;GET \/ftp\/Win7_rtm_with_loader\/cn_windows_7_professional_x86_dvd_x15-65790.iso HTTP\/1.1&#8221; 416 615 &#8220;http:\/\/yewen.us\/&#8221; &#8220;Mozilla\/4.0 (compatible; MSIE 9.0; Windows NT 6.1; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729)&#8221;<br \/>\n14.115.129.55 &#8211; &#8211; [21\/Apr\/2013:19:44:22 +0800] &#8220;GET \/ftp\/Win7_rtm_with_loader\/cn_windows_7_professional_x86_dvd_x15-65790.iso HTTP\/1.1&#8221; 416 615 &#8220;http:\/\/yewen.us\/&#8221; &#8220;Mozilla\/4.0 (compatible; MSIE 9.0; Windows NT 6.1; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729)&#8221;<br \/>\n14.115.129.55 &#8211; &#8211; [21\/Apr\/2013:19:44:25 +0800] &#8220;GET \/ftp\/Win7_rtm_with_loader\/cn_windows_7_professional_x86_dvd_x15-65790.iso HTTP\/1.1&#8221; 416 615 &#8220;http:\/\/yewen.us\/&#8221; &#8220;Mozilla\/4.0 (compatible; MSIE 9.0; Windows NT 6.1; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729)&#8221;<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>BuyVM \u7684 VPS \u65e9\u4e24\u5468\u5fd8\u4e86\u662f\u8c01\u63d0\u9192\u4e86\u4e0b, \u8bf4 buyvm \u5bb6 15$\/yr \u7684 VPS \u6709\u8d27, \u975e\u5e38\u503c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[3,7],"tags":[36,49,109,110,117,119,163,169],"class_list":["post-1739","post","type-post","status-publish","format-standard","hentry","category-blog-manage","category-tech-notes","tag-buyvm","tag-debian","tag-mysql","tag-nginx","tag-php","tag-php-fpm","tag-vps","tag-wordpress"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4aR5e-s3","_links":{"self":[{"href":"https:\/\/www.yewen.us\/blog\/wp-json\/wp\/v2\/posts\/1739","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yewen.us\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yewen.us\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yewen.us\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yewen.us\/blog\/wp-json\/wp\/v2\/comments?post=1739"}],"version-history":[{"count":2,"href":"https:\/\/www.yewen.us\/blog\/wp-json\/wp\/v2\/posts\/1739\/revisions"}],"predecessor-version":[{"id":1962,"href":"https:\/\/www.yewen.us\/blog\/wp-json\/wp\/v2\/posts\/1739\/revisions\/1962"}],"wp:attachment":[{"href":"https:\/\/www.yewen.us\/blog\/wp-json\/wp\/v2\/media?parent=1739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yewen.us\/blog\/wp-json\/wp\/v2\/categories?post=1739"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yewen.us\/blog\/wp-json\/wp\/v2\/tags?post=1739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}