|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
欢迎大家来到仓酷云论坛!因为屡次必要设置CentOSpython,爽性写成一个剧本。
利用版本:CentOSrelease6.3(Final),其他没测试过。
一句话装置(必要能sudo或root):
[plain]viewplaincopy
- wgethttps://gist.github.com/zagfai/9087397/raw/16b0765875764bfc61c79330fbd242f7551c010d/centpy.sh&&sudoshcentpy.sh&&rmcentpy.sh
具体代码以下,
[plain]viewplaincopy
- #!/bin/bash
- #systempackages=============================================================
- yum-yinstallpython-developensslopenssl-develgccsqlitesqlite-develmysql-devellibxml2-devellibxslt-devel
- #Python======================================================================
- wgethttp://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz
- tar-xzfPython-2.7.6.tgz
- cdPython-2.7.6
- ./configure--prefix=/usr/local/python2.7--with-threads--enable-shared
- make&&makealtinstall
- ln-s/usr/local/python2.7/lib/libpython2.7.so/usr/lib
- ln-s/usr/local/python2.7/lib/libpython2.7.so.1.0/usr/lib
- ln-s/usr/local/python2.7/bin/python2.7/usr/bin
- ln-s/usr/bin/python2.7/usr/bin/python27
- /sbin/ldconfig-v
- #easyinstallandpip=========================================================
- wgethttp://pypi.python.org/packages/source/d/distribute/distribute-0.6.49.tar.gz--no-check-certificate
- tarxfdistribute-0.6.49.tar.gz
- cddistribute-0.6.49
- python2.7setup.pyinstall
- /usr/local/python2.7/bin/easy_installpip
- ln-s/usr/local/python2.7/bin/pip/usr/bin
- #preinstallpackages=========================================================
- pipinstallmysql-pythonipythonrequestsreadlinebeautifulsoup4html5lib
- ln-s/usr/local/python2.7/bin/ipython/usr/bin
- wgethttps://github.com/zagfai/webtul/archive/v0.31.zip
- unzipv0.31
- cdwebtul-0.31&&sudopython2.7setup.pyinstall
- #Done
- echormdirs.............
- rmPython-2.7.6Python-2.7.6.tgz-r
- echoFinishInstall!!!!!!!!!!
- python2.7-V
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的小伙伴们! |
|