{"id":1253,"date":"2014-09-21T16:49:14","date_gmt":"2014-09-21T08:49:14","guid":{"rendered":"http:\/\/www.51cos.com\/?p=1253"},"modified":"2016-12-29T01:34:13","modified_gmt":"2016-12-28T17:34:13","slug":"lnmp-vps%ef%bc%88debian%ef%bc%89%e5%ae%89%e8%a3%85%e9%85%8d%e7%bd%aepython%e6%9d%a5%e8%bf%90%e8%a1%8cpython%e8%84%9a%e6%9c%ac","status":"publish","type":"post","link":"http:\/\/www.51cos.com\/?p=1253","title":{"rendered":"LNMP VPS\uff08Debian\uff09\u5b89\u88c5\u914d\u7f6ePython\u6765\u8fd0\u884cpython\u811a\u672c"},"content":{"rendered":"<p>\u6709\u4e86VPS\u4e0d\u6298\u817e\u5c31\u4e0d\u8212\u670d\uff0c\u4eca\u5929\u770b\u5230\u522b\u4eba\u5199\u7684Python\u811a\u672c\uff0c\u60f3\u62ff\u6765\u73a9\u73a9\uff0c<\/p>\n<p><strong><a href=\"https:\/\/github.com\/PeterDing\/iScript\" target=\"_blank\" rel=\"nofollow\">iScript<\/a><\/strong>\u662fGithub\u4e0a<a href=\"https:\/\/github.com\/PeterDing\" target=\"_blank\" rel=\"nofollow\">PeterDing<\/a>\u5199\u7684\u4e00\u4e2a\u811a\u672c\u96c6\uff0c\u7531\u591a\u6570\u7684<a href=\"https:\/\/www.python.org\/\" target=\"_blank\" rel=\"nofollow\">python<\/a>\u811a\u672c\u548c\u5c11\u6570GM\u811a\u672c\u7ec4\u6210\uff0c\u8ba8\u8bba\u533a\u5728\u8fd9\u91cchttp:\/\/www.v2ex.com\/t\/110196<\/p>\n<p>\u542b\u6709\u4ee5\u4e0b\u51e0\u4e2a\u811a\u672c\uff1a<\/p>\n<p><a href=\"https:\/\/github.com\/PeterDing\/iScript\/raw\/master\/xiami.py\" target=\"_blank\" rel=\"nofollow\">xiami.py<\/a> &#8211; \u4e0b\u8f7d\u6216\u64ad\u653e\u9ad8\u54c1\u8d28\u867e\u7c73\u97f3\u4e50(xiami.com)<\/p>\n<p><a href=\"https:\/\/github.com\/PeterDing\/iScript\/raw\/master\/pan.baidu.com.py\" target=\"_blank\" rel=\"nofollow\">pan.baidu.com.py<\/a> &#8211; \u767e\u5ea6\u7f51\u76d8\u7684\u4e0b\u8f7d\u3001\u79bb\u7ebf\u4e0b\u8f7d\u3001\u4e0a\u4f20\u3001\u64ad\u653e\u3001\u8f6c\u5b58\u3001\u6587\u4ef6\u64cd\u4f5c<\/p>\n<p><a href=\"https:\/\/github.com\/PeterDing\/iScript\/raw\/master\/bt.py\" target=\"_blank\" rel=\"nofollow\">bt.py<\/a> &#8211; magnet torrent \u4e92\u8f6c\u3001\u53ca \u8fc7\u6ee4\u654f.\u611f.\u8bcd<\/p>\n<p><a href=\"https:\/\/github.com\/PeterDing\/iScript\/raw\/master\/115.py\" target=\"_blank\" rel=\"nofollow\">115.py<\/a> &#8211; 115\u7f51\u76d8\u7684\u4e0b\u8f7d\u548c\u64ad\u653e<\/p>\n<p><a href=\"https:\/\/github.com\/PeterDing\/iScript\/raw\/master\/yunpan.360.cn.py\" target=\"_blank\" rel=\"nofollow\">yunpan.360.cn.py<\/a> &#8211; 360\u7f51\u76d8\u7684\u4e0b\u8f7d<\/p>\n<p><a href=\"https:\/\/github.com\/PeterDing\/iScript\/raw\/master\/music.baidu.com.py\" target=\"_blank\" rel=\"nofollow\">music.baidu.com.py<\/a> &#8211; \u4e0b\u8f7d\u6216\u64ad\u653e\u9ad8\u54c1\u8d28\u767e\u5ea6\u97f3\u4e50(music.baidu.com)<\/p>\n<p><a href=\"https:\/\/github.com\/PeterDing\/iScript\/raw\/master\/music.163.com.py\" target=\"_blank\" rel=\"nofollow\">music.163.com.py<\/a> &#8211; \u4e0b\u8f7d\u6216\u64ad\u653e\u9ad8\u54c1\u8d28\u7f51\u6613\u97f3\u4e50(music.163.com)<\/p>\n<p><a href=\"https:\/\/github.com\/PeterDing\/iScript\/raw\/master\/flvxz_cl.py\" target=\"_blank\" rel=\"nofollow\">flvxz_cl.py<\/a> &#8211; flvxz.com \u89c6\u9891\u89e3\u6790 client &#8211; \u652f\u6301\u4e0b\u8f7d\u3001\u64ad\u653e<\/p>\n<p><a href=\"https:\/\/github.com\/PeterDing\/iScript\/raw\/master\/tumblr.py\" target=\"_blank\" rel=\"nofollow\">tumblr.py<\/a> &#8211; \u4e0b\u8f7d\u67d0\u4e2atumblr.com\u7684\u6240\u6709\u56fe\u7247<\/p>\n<p><a href=\"https:\/\/github.com\/PeterDing\/iScript\/raw\/master\/unzip.py\" target=\"_blank\" rel=\"nofollow\">unzip.py<\/a> &#8211; \u89e3\u51b3linux\u4e0bunzip\u4e71\u7801\u7684\u95ee\u9898<\/p>\n<p><a href=\"https:\/\/github.com\/PeterDing\/iScript\/raw\/master\/ed2k_search.py\" target=\"_blank\" rel=\"nofollow\">ed2k_search.py<\/a> &#8211; \u57fa\u4e8e donkey4u.com \u7684emule\u641c\u7d22<\/p>\n<p><a href=\"https:\/\/github.com\/PeterDing\/iScript\/raw\/master\/91porn.py\" target=\"_blank\" rel=\"nofollow\">91porn.py<\/a> &#8211; \u4e0b\u8f7d\u6216\u64ad\u653e91porn\u3000\u3000\u3000<strong>\u9ad8\u80fd\u9884\u8b66\uff1a\u672a\u6ee118\u5468\u5c81\u8bf7\u81ea\u884c\u9000\u907f<\/strong><\/p>\n<p><a href=\"https:\/\/github.com\/PeterDing\/iScript\/raw\/master\/ThunderLixianExporter.user.js\" target=\"_blank\" rel=\"nofollow\">\u00a0<\/a><\/p>\n<p>\u53ef\u60dc\u8fd0\u884c\u4e0d\u4e86\uff0c\u4e8e\u662f\u5148\u5b89\u88c5Python\uff08\u6ce8\u610f\u6211\u7684OS\u662fDebian\uff0c\u7528UBUNTU\u7b49\u7cfb\u7edf\u7684\u540c\u5b66\u8bf7\u53c2\u8003\uff09<\/p>\n<p>&nbsp;<\/p>\n<pre>wget http:\/\/www.python.org\/ftp\/python\/2.7.2\/Python-2.7.2.tar.bz2<br \/>\ntar jxvf Python2.7.2.tar.bz2<br \/>\ncd Python2.7.2<br \/>\n.\/configure<br \/>\nmake<br \/>\nmake install<br \/>\n#\u81ea\u6b64,python2.7\u5b89\u88c5\u540e\u8def\u5f84\u9ed8\u8ba4\u662f\u5728\/usr\/local\/lib\/python2.7<br \/>\nln -s \/usr\/local\/bin\/python2.7 \/usr\/bin\/python<br \/>\npython -V<\/p>\n<p>\u8fd0\u884c\u4e0b\u811a\u672c\u8bd5\u8bd5\uff1a<\/p>\n<pre> .\/tumblr.py<br \/>\n\/usr\/bin\/env: python2: No such file or directory<\/p>\n<p>\u597d\u5427\uff0c\u6267\u884c\u4e0b<\/p>\n<pre> ln -s \/usr\/bin\/python \/usr\/local\/bin\/python2<\/p>\n<p>\u518d\u8fd0\u884c\u4e0b\uff0c\u53c8\u51fa\u9519\uff0c\u660f\u5012\uff1a<\/p>\n<pre>.\/tumblr.py<br \/>\nTraceback (most recent call last):<br \/>\n  File \".\/tumblr.py\", line 8, in<br \/>\n    import requests<br \/>\nImportError: No module named requests<\/p>\n<p>\u770b\u6765\u662f\u4f9d\u8d56\u5e93\u6ca1\u6709\uff0c\u7ee7\u7eed\u6267\u884c<\/p>\n<pre>apt-get update<br \/>\napt-get install python-setuptools<br \/>\napt-get install python-pip<br \/>\npip install requests requests_toolbelt<\/p>\n<p>\u518d\u6267\u884c\u4e0b\uff0cOK\u4e86\uff01<\/p>\n<p>&nbsp;<\/p>\n<p>\u603b\u7ed3\u6574\u4e2a\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<pre>wget http:\/\/www.python.org\/ftp\/python\/2.7.2\/Python-2.7.2.tar.bz2<br \/>\ntar jxvf Python2.7.2.tar.bz2<br \/>\ncd Python2.7.2<br \/>\n.\/configure<br \/>\nmake<br \/>\nmake install<br \/>\n#python2.7\u5b89\u88c5\u540e\u8def\u5f84\u9ed8\u8ba4\u662f\u5728\/usr\/local\/lib\/python2.7<br \/>\nln -s \/usr\/local\/bin\/python2.7 \/usr\/bin\/python <\/p>\n<pre> ln -s \/usr\/bin\/python \/usr\/local\/bin\/python2 <\/p>\n<pre>apt-get update<br \/>\napt-get install python-setuptools<br \/>\napt-get install python-pip<br \/>\npip install requests requests_toolbelt<br \/>\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6709\u4e86VPS\u4e0d\u6298\u817e\u5c31\u4e0d\u8212\u670d\uff0c\u4eca\u5929\u770b\u5230\u522b\u4eba\u5199\u7684Python\u811a\u672c\uff0c\u60f3\u62ff\u6765\u73a9\u73a9\uff0c iScript\u662fGithub\u4e0aPet [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-1253","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/posts\/1253","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.51cos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1253"}],"version-history":[{"count":1,"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/posts\/1253\/revisions"}],"predecessor-version":[{"id":2042,"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/posts\/1253\/revisions\/2042"}],"wp:attachment":[{"href":"http:\/\/www.51cos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.51cos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1253"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.51cos.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}