{"id":257,"date":"2016-05-29T15:33:01","date_gmt":"2016-05-29T07:33:01","guid":{"rendered":"http:\/\/yyshell.com\/?p=257"},"modified":"2016-05-29T15:33:01","modified_gmt":"2016-05-29T07:33:01","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8centos%e4%b8%ad%e4%bd%bf%e7%94%a8software-collections-scl%e6%ba%90","status":"publish","type":"post","link":"https:\/\/yyshell.com\/?p=257","title":{"rendered":"\u5982\u4f55\u5728centos\u4e2d\u4f7f\u7528Software Collections (SCL)\u6e90"},"content":{"rendered":"<p>\u5982\u679c\u4f60\u662f\u4e00\u4f4d\u516c\u53f8\u8d1f\u8d23\u4eba\uff0c\u516c\u53f8\u82b1\u94b1\u5f00\u53d1\u4e86\u4e00\u5957\u7cfb\u7edf\uff0c\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u4f60\u603b\u662f\u5e0c\u671b\u4f60\u8fd9\u53f0\u7cfb\u7edf\u5728\u751f\u547d\u5468\u671f\u4e2d\u4e00\u76f4\u7a33\u5b9a\u8fd0\u884c\u4e0b\u53bb\u3002\u90a3\u4e48\uff0c\u5f88\u660e\u663e\uff0c\u50cfRHEL\u90a3\u6837\u7684\u63d0\u4f9b10\u5e74\u957f\u671f\u652f\u6301\u7684\u53d1\u884c\u7248\u662f\u975e\u5e38\u9002\u5408\u4f60\u90a3\u6837\u7684\u4f01\u4e1a\u7528\u6237\u7684\uff0c\u5982\u679c\u4f60\u6682\u65f6\u4e0d\u60f3\u82b1\u592a\u591a\u7684\u94b1\uff0cRHEL\u7684\u793e\u533a\u7248\u672cCentOS\u663e\u7136\u662f\u5f88\u9002\u5408\u4f60\u7684\u3002\u5728\u652f\u6301\u671f\u5185\uff0cRedhat\u4f1a\u7ef4\u6301\u7cfb\u7edf\u7684\u5185\u6838\u5927\u7684\u7248\u672c\u53f7\u4e0d\u53d8\uff0c\u6709\u65f6\u4f1a\u628a\u9ad8\u7248\u672c\u5185\u6838\u4e2d\u7684\u4e00\u4e9b\u7279\u6027\u79fb\u690d\u5230\u8001\u7684\u5185\u6838\u4e2d\uff0c\u5728\u8fd9\u4e2a\u8fc7\u7a0b\u4e2d\uff0c\u4f1a\u7ef4\u6301\u5185\u6838\u548c\u5404\u7c7b\u8f6f\u4ef6\u7684API\u3001ABI\u63a5\u53e3\u517c\u5bb9\u6027\uff0c\u771f\u662f\u975e\u5e38\u7684\u8d34\u5fc3\u3002<\/p>\n<p>\u4f46\u662f\uff0c\u95ee\u9898\u6765\u4e86\uff0c\u8fd9\u79cd\u8bdd\u5927\u91cf\u4ee3\u4ef7\u7ef4\u62a4\u7684\u201c\u7a33\u5b9a\u6027\u201d\uff0c\u5bfc\u81f4\u7684\u4e00\u4e2a\u7ed3\u679c\u5c31\u662f\u7cfb\u7edf\u9ed8\u8ba4\u8f6f\u4ef6\u6e90\u4e2d\u7684\u8f6f\u4ef6\u975e\u5e38\u8001\u65e7\uff0c\u6ca1\u6709\u90a3\u4e9b\u201c\u5148\u8fdb\u201d\u7684\u793e\u533a\u53d1\u884c\u7248\u6709\u90a3\u4e9b\u6700\u8fd1\u6700\u65f6\u9ae6\u7684\u7248\u672c\u3002\u4e3e\u4f8b\u6765\u8bf4\uff0ccentos6\u7684\u5185\u7f6e\u7684python\u7248\u672c\u8fd8\u662f2.6.6\u7684\uff0cmysql\u6570\u636e\u5e93\u662f5.1\u7248\u672c\u7684\uff0c\u8fd9\u4e9b\u5728\u5b8310\u5e74\u7684\u751f\u547d\u5468\u671f\u4e2d\u662f\u4e0d\u4f1a\u6539\u53d8\u7684\uff0c\u9876\u591a\u53ea\u4f1a\u8fdb\u884c\u7248\u672c\u5185\u7684\u5c0f\u5347\u7ea7\uff0c\u4e00\u53e5\u8bdd\u8fd8\u662f\u4e3a\u4e86\u826f\u597d\u7684\u517c\u5bb9\u6027\u3002<\/p>\n<p>\u6709\u4e9b\u8f6f\u4ef6\u8fd8\u597d\u4e00\u70b9\uff0c\u9876\u591a\u81ea\u5df1\u901a\u8fc7\u6e90\u7801\u7f16\u8bd1\u5b89\u88c5\u5c31\u597d\u4e86\uff0c\u6709\u4e9b\u8f6f\u4ef6\u548c\u7cfb\u7edf\u96c6\u6210\u8f83\u6df1\u7684\uff0c\u5b89\u88c5\u65f6\u4f9d\u8d56\u5904\u7406\u4e0d\u597d\uff0c\u5f88\u53ef\u80fd\u5bf9\u7834\u574f\u539f\u7cfb\u7edf\u7684\u7ec4\u4ef6\uff0c\u6216\u8005\u7b49\u4f60yum\u5b89\u88c5\u65f6\uff0c\u9020\u6210\u5404\u7c7b\u95ee\u9898\u3002\u6240\u4ee5\uff0c\u6211\u5efa\u8bae\uff0c\u50cfpython\u8fd9\u6837\u4e0e\u7cfb\u7edf\u96c6\u6210\u6bd4\u8f83\u6df1\u7684\u8f6f\u4ef6\uff0c\u6700\u597d\u4e0d\u8981\u624b\u52a8\u5b89\u88c5\u5347\u7ea7\u3002<\/p>\n<p>Software Collections (SCL)\u6e90\u5c31\u662f\u4e3a\u4e86\u89e3\u51b3RHEL\u548cCentOS\u7528\u6237\u8fd9\u7c7b\u95ee\u9898\u7684\uff0credhat\u628a\u8fd9\u4e2a\u7ffb\u8bd1\u6210\u4e2d\u6587\u597d\u50cf\u53eb\u201c\u8f6f\u4ef6\u7cbe\u9009\u201d\uff0c\u4f3c\u4e4e\u633a\u5f62\u8c61\u7684\u3002\u4ee5centos6\u4e3a\u4f8b\uff0c\u5b83\u7684scl\u6e90\u76ee\u524d\u5927\u81f4\u63d0\u4f9b\u8fd9\u4e9b\u8f6f\u4ef6\uff1a<\/p>\n<ul>\n<li>git1.9 git2.5 svn1.9<\/li>\n<li>php5.4 5.5 5.6<\/li>\n<li>Ruby on Rails 4.2<\/li>\n<li>httpd 2.4.12<\/li>\n<li>ruby 1.9.3 2.0 2.2<\/li>\n<li>python 2.7 3.3<\/li>\n<li>gcc 5.2.1 4.9.2 \u53ca\u76f8\u5e94\u5176\u4ed6\u7684\u5f00\u53d1\u5de5\u5177<\/li>\n<li>mysql 5.5 5.6 mariadb 5.5 10.0<\/li>\n<\/ul>\n<p>\u8fd8\u662f\u5176\u4ed6\u7684\uff0c\u4e0d\u5982perl\uff0cnginx\uff0c\u53cd\u6b63\u5e38\u7528\u7684\u4e00\u4e9b\u8f6f\u4ef6\uff0c\u53c8\u6709\u5f88\u591a\u9ad8\u7248\u672c\u9700\u6c42\u7684\uff0cscl\u4e0a\u8fd8\u662f\u5f88\u591a\u7684\uff0c\u57fa\u672c\u80fd\u6ee1\u8db3\u6211\u4eec\u4f7f\u7528\u3002<\/p>\n<p><strong>\u5982\u4f55\u4f7f\u7528scl\u8f6f\u4ef6\u6e90<\/strong><\/p>\n<p>\u4ee5centos6\u4e3a\u4f8b\uff0c<\/p>\n<pre class=\"lang:default decode:true \">yum -y install centos-release-scl<\/pre>\n<p>\u67e5\u770bscl\u4e0a\u6709\u54ea\u4e9b\u8f6f\u4ef6\uff1a<\/p>\n<pre class=\"lang:default decode:true\">yum --disablerepo=\"*\" --enablerepo=\"centos-sclo-sclo\" list available<\/pre>\n<pre class=\"lang:default decode:true \">yum --disablerepo=\"*\" --enablerepo=\"centos-sclo-rh\" list available<\/pre>\n<p>\u641c\u7d22\u8f6f\u4ef6\u5305\uff1a<\/p>\n<pre class=\"lang:default decode:true \">yum --disablerepo=\"*\" --enablerepo=\"centos-sclo-sclo\" search &lt;keyword&gt;<\/pre>\n<pre class=\"lang:default decode:true \">yum --disablerepo=\"*\" --enablerepo=\"centos-sclo-rh\" search &lt;keyword&gt;<\/pre>\n<p>\u6bd4\u5982\u8981\u5b89\u88c5python3.3\uff0c\u53ea\u9700\u8981<\/p>\n<pre class=\"lang:default decode:true \">yum -y install python33<\/pre>\n<p>\u67e5\u770b\u5df2\u7ecf\u5b89\u88c5\u4e86\u54ea\u4e9bscl\u8f6f\u4ef6\u5305\uff1a<\/p>\n<pre class=\"lang:default decode:true \">scl --list<\/pre>\n<p>\u4f1a\u663e\u793a\u4f60\u5b89\u88c5\u7684\u8f6f\u4ef6\uff0c\u8fd9\u91cc\u662f<\/p>\n<pre class=\"lang:default decode:true \">python33<\/pre>\n<p>scl\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305\uff0c\u4e0d\u4f1a\u8986\u76d6\u7cfb\u7edf\u7684\u8f6f\u4ef6\uff0c\u901a\u5e38\uff0cscl\u4e0a\u7684\u8f6f\u4ef6\u90fd\u662f\u5b89\u88c5\u518d\/opt\u76ee\u5f55\u7684\uff0c\u4f60\u6b64\u65f6\u5728\u7cfb\u7edf\u6267\u884c<\/p>\n<pre class=\"lang:default decode:true \">python -V<\/pre>\n<p>\u7ed3\u679c\u662f\uff1a<\/p>\n<pre class=\"lang:default decode:true \">Python 2.6.6<\/pre>\n<p>\u8981\u542f\u7528scl\u8f6f\u4ef6\u5305<\/p>\n<pre class=\"lang:default decode:true \">scl enable &lt;scl-package-name&gt; &lt;command&gt;<\/pre>\n<p>\u6b64\u5904\u5c31\u662f\uff1a<\/p>\n<pre class=\"lang:default decode:true \">scl enable python33 'python -V'<\/pre>\n<p>\u7ed3\u679c\u662f<\/p>\n<pre class=\"lang:default decode:true \">Python 3.3.2<\/pre>\n<p>\u901a\u5e38\uff0c\u6211\u4eec\u4f1a\u7cfb\u7edf\u6574\u4e2a\u8f6f\u4ef6\u5305\u5728\u5f53\u524dshell\u4e00\u76f4\u53ef\u7528\uff0c\u8fd9\u65f6\u5019\uff0c\u6211\u4eec\u6267\u884c\uff1a<\/p>\n<pre class=\"lang:default decode:true\">scl enable python33 bash<\/pre>\n<p>\u8fd9\u6837\u5728\u5f53\u524d\u7684shell\u4e2d\uff0c\u548cpython\u76f8\u5173\u7684\u547d\u4ee4\u90fd\u662f3.3\u7684\u4e86\uff0c\u9000\u51fa\u5f53\u524dshell\u540e\uff0c\u5931\u6548\u3002<\/p>\n<p>\u603b\u800c\u8a00\u4e4b\uff0cscl\u548cpython\u7684virtualenv\u6709\u70b9\u76f8\u4f3c\uff0cscl\u9664\u4e86\u53ef\u4ee5\u5f00\u542f\u7981\u7528python\u5916\uff0c\u8fd8\u53ef\u4ee5\u6709\u5927\u91cf\u5176\u4ed6\u7684\u8f6f\u4ef6\u53ef\u4f9b\u9009\u62e9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u679c\u4f60\u662f\u4e00\u4f4d\u516c\u53f8\u8d1f\u8d23\u4eba\uff0c\u516c\u53f8\u82b1\u94b1\u5f00\u53d1\u4e86\u4e00\u5957\u7cfb\u7edf\uff0c\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u4f60\u603b\u662f\u5e0c\u671b\u4f60\u8fd9\u53f0\u7cfb\u7edf<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-257","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/yyshell.com\/index.php?rest_route=\/wp\/v2\/posts\/257","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yyshell.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yyshell.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yyshell.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yyshell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=257"}],"version-history":[{"count":1,"href":"https:\/\/yyshell.com\/index.php?rest_route=\/wp\/v2\/posts\/257\/revisions"}],"predecessor-version":[{"id":258,"href":"https:\/\/yyshell.com\/index.php?rest_route=\/wp\/v2\/posts\/257\/revisions\/258"}],"wp:attachment":[{"href":"https:\/\/yyshell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yyshell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yyshell.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}