{"id":43602,"date":"2024-10-05T23:57:10","date_gmt":"2024-10-05T15:57:10","guid":{"rendered":"https:\/\/server.hk\/cnblog\/43602\/"},"modified":"2024-10-05T23:57:10","modified_gmt":"2024-10-05T15:57:10","slug":"centos-6-8-%e5%ae%89%e8%a3%9d-python-2-7-%e4%bb%a5%e5%8f%8a-xx-net","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/43602\/","title":{"rendered":"CentOS 6.8 \u5b89\u88dd Python 2.7 \u4ee5\u53ca XX-Net"},"content":{"rendered":"<h1 id=\"centos-6-8-%e5%ae%89%e8%a3%9d-python-2-7-%e4%bb%a5%e5%8f%8a-xx-net-lnbQXvQtjp\">CentOS 6.8 \u5b89\u88dd Python 2.7 \u4ee5\u53ca XX-Net<\/h1>\n<p>\u5728\u7576\u4eca\u7684\u7db2\u7d61\u74b0\u5883\u4e2d\uff0cPython \u4f5c\u70ba\u4e00\u7a2e\u9ad8\u6548\u4e14\u6613\u65bc\u5b78\u7fd2\u7684\u7de8\u7a0b\u8a9e\u8a00\uff0c\u5df2\u7d93\u6210\u70ba\u8a31\u591a\u958b\u767c\u8005\u7684\u9996\u9078\u3002\u800c XX-Net \u662f\u4e00\u500b\u57fa\u65bc Python \u7684\u4ee3\u7406\u5de5\u5177\uff0c\u80fd\u5920\u5e6b\u52a9\u7528\u6236\u7a81\u7834\u7db2\u7d61\u9650\u5236\u3002\u672c\u6587\u5c07\u4ecb\u7d39\u5982\u4f55\u5728 CentOS 6.8 \u4e0a\u5b89\u88dd Python 2.7 \u4ee5\u53ca XX-Net\u3002<\/p>\n<h2 id=\"%e4%b8%80%e3%80%81%e5%ae%89%e8%a3%9d-python-2-7-lnbQXvQtjp\">\u4e00\u3001\u5b89\u88dd Python 2.7<\/h2>\n<p>CentOS 6.8 \u9810\u8a2d\u5b89\u88dd\u7684 Python \u7248\u672c\u70ba 2.6\uff0c\u82e5\u8981\u5b89\u88dd Python 2.7\uff0c\u9700\u9032\u884c\u4ee5\u4e0b\u6b65\u9a5f\uff1a<\/p>\n<h3 id=\"1-%e6%9b%b4%e6%96%b0%e7%b3%bb%e7%b5%b1-lnbQXvQtjp\">1. \u66f4\u65b0\u7cfb\u7d71<\/h3>\n<pre><code>sudo yum update<\/code><\/pre>\n<h3 id=\"2-%e5%ae%89%e8%a3%9d%e5%bf%85%e8%a6%81%e7%9a%84%e4%be%9d%e8%b3%b4%e5%8c%85-lnbQXvQtjp\">2. \u5b89\u88dd\u5fc5\u8981\u7684\u4f9d\u8cf4\u5305<\/h3>\n<p>\u5728\u5b89\u88dd Python 2.7 \u4e4b\u524d\uff0c\u9996\u5148\u9700\u8981\u5b89\u88dd\u4e00\u4e9b\u5fc5\u8981\u7684\u4f9d\u8cf4\u5305\uff1a<\/p>\n<pre><code>sudo yum install gcc openssl-devel bzip2-devel libffi-devel<\/code><\/pre>\n<h3 id=\"3-%e4%b8%8b%e8%bc%89-python-2-7-%e6%ba%90%e7%a2%bc-lnbQXvQtjp\">3. \u4e0b\u8f09 Python 2.7 \u6e90\u78bc<\/h3>\n<p>\u63a5\u4e0b\u4f86\uff0c\u5f9e\u5b98\u65b9\u7db2\u7ad9\u4e0b\u8f09 Python 2.7 \u7684\u6e90\u78bc\uff1a<\/p>\n<pre><code>wget https:\/\/www.python.org\/ftp\/python\/2.7.18\/Python-2.7.18.tgz<\/code><\/pre>\n<h3 id=\"4-%e8%a7%a3%e5%a3%93%e6%ba%90%e7%a2%bc%e5%8c%85-lnbQXvQtjp\">4. \u89e3\u58d3\u6e90\u78bc\u5305<\/h3>\n<pre><code>tar xzf Python-2.7.18.tgz<\/code><\/pre>\n<h3 id=\"5-%e7%b7%a8%e8%ad%af%e5%92%8c%e5%ae%89%e8%a3%9d-python-2-7-lnbQXvQtjp\">5. \u7de8\u8b6f\u548c\u5b89\u88dd Python 2.7<\/h3>\n<p>\u9032\u5165\u89e3\u58d3\u5f8c\u7684\u76ee\u9304\uff0c\u7136\u5f8c\u7de8\u8b6f\u548c\u5b89\u88dd\uff1a<\/p>\n<pre><code>cd Python-2.7.18\n.\/configure --enable-optimizations\nmake altinstall<\/code><\/pre>\n<p>\u5b89\u88dd\u5b8c\u6210\u5f8c\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6aa2\u67e5 Python 2.7 \u662f\u5426\u5b89\u88dd\u6210\u529f\uff1a<\/p>\n<pre><code>python2.7 --version<\/code><\/pre>\n<h2 id=\"%e4%ba%8c%e3%80%81%e5%ae%89%e8%a3%9d-xx-net-lnbQXvQtjp\">\u4e8c\u3001\u5b89\u88dd XX-Net<\/h2>\n<p>\u5b89\u88dd\u5b8c Python 2.7 \u5f8c\uff0c\u63a5\u4e0b\u4f86\u53ef\u4ee5\u5b89\u88dd XX-Net\u3002XX-Net \u662f\u4e00\u500b\u57fa\u65bc Python \u7684\u4ee3\u7406\u5de5\u5177\uff0c\u80fd\u5920\u5e6b\u52a9\u7528\u6236\u8a2a\u554f\u88ab\u9650\u5236\u7684\u7db2\u7ad9\u3002<\/p>\n<h3 id=\"1-%e4%b8%8b%e8%bc%89-xx-net-lnbQXvQtjp\">1. \u4e0b\u8f09 XX-Net<\/h3>\n<p>\u4f7f\u7528 wget \u547d\u4ee4\u4e0b\u8f09 XX-Net \u7684\u6700\u65b0\u7248\u672c\uff1a<\/p>\n<pre><code>wget https:\/\/github.com\/XX-net\/XX-Net\/archive\/master.zip<\/code><\/pre>\n<h3 id=\"2-%e8%a7%a3%e5%a3%93-xx-net-lnbQXvQtjp\">2. \u89e3\u58d3 XX-Net<\/h3>\n<pre><code>unzip master.zip<\/code><\/pre>\n<h3 id=\"3-%e9%80%b2%e5%85%a5-xx-net-%e7%9b%ae%e9%8c%84-lnbQXvQtjp\">3. \u9032\u5165 XX-Net \u76ee\u9304<\/h3>\n<pre><code>cd XX-Net-master<\/code><\/pre>\n<h3 id=\"4-%e5%95%9f%e5%8b%95-xx-net-lnbQXvQtjp\">4. \u555f\u52d5 XX-Net<\/h3>\n<p>\u4f7f\u7528 Python 2.7 \u555f\u52d5 XX-Net\uff1a<\/p>\n<pre><code>python2.7 start.py<\/code><\/pre>\n<p>\u555f\u52d5\u5f8c\uff0c\u60a8\u53ef\u4ee5\u5728\u700f\u89bd\u5668\u4e2d\u8a2a\u554f <a href=\"http:\/\/127.0.0.1:8085\" rel=\"nofollow\">http:\/\/127.0.0.1:8085<\/a> \u4f86\u914d\u7f6e\u548c\u4f7f\u7528 XX-Net\u3002<\/p>\n<h2 id=\"%e4%b8%89%e3%80%81%e7%b8%bd%e7%b5%90-lnbQXvQtjp\">\u4e09\u3001\u7e3d\u7d50<\/h2>\n<p>\u672c\u6587\u4ecb\u7d39\u4e86\u5982\u4f55\u5728 CentOS 6.8 \u4e0a\u5b89\u88dd Python 2.7 \u4ee5\u53ca XX-Net\u3002\u9019\u4e9b\u5de5\u5177\u4e0d\u50c5\u80fd\u5920\u5e6b\u52a9\u958b\u767c\u8005\u9032\u884c\u7de8\u7a0b\uff0c\u9084\u80fd\u5920\u5e6b\u52a9\u7528\u6236\u7a81\u7834\u7db2\u7d61\u9650\u5236\uff0c\u7372\u53d6\u66f4\u81ea\u7531\u7684\u4e0a\u7db2\u9ad4\u9a57\u3002\u5982\u679c\u60a8\u9700\u8981\u7a69\u5b9a\u7684 <a href=\"https:\/\/server.hk\">VPS<\/a> \u670d\u52d9\u4f86\u904b\u884c\u9019\u4e9b\u61c9\u7528\uff0c\u8acb\u8003\u616e\u6211\u5011\u7684\u89e3\u6c7a\u65b9\u6848\uff0c\u63d0\u4f9b\u9ad8\u6548\u7684 <a href=\"https:\/\/server.hk\">\u9999\u6e2f\u4f3a\u670d\u5668<\/a> \u670d\u52d9\uff0c\u6eff\u8db3\u60a8\u7684\u9700\u6c42\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to install Python 2.7 and XX-Net on CentOS 6.8 with this step-by-step guide for seamless setup and configuration.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4924],"tags":[],"class_list":["post-43602","post","type-post","status-publish","format-standard","hentry","category-setup-tutorials"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/43602","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=43602"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/43602\/revisions"}],"predecessor-version":[{"id":43603,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/43602\/revisions\/43603"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=43602"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=43602"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=43602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}