CentOS 5.5 安装 Python 2.7_老范的空间_百度空间
CentOS 5.5 安装 Python 2.72011-11-23 15:48
转自: http://villaroad.com/2010/10/rolling-python-2-6-2-on-centos-5-3/
具体步骤如下:
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
rpm -Uhv rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
yum -y groupinstall 'Development Tools'
yum-y install openssl-devel* zlib*.x86_64
wget http://sqlite.org/sqlite-amalgamation-3.7.3.tar.gz
wget http://python.org/ftp/python/2.7/Python-2.7.tgz
wget http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg
tar xfz sqlite-amalgamation-3.7.3.tar.gz
cd sqlite-3.7.3/
./configure&&make&&makeinstall
tar xfz Python-2.7.tgz cd Python-2.7
./configure --prefix=/opt/python2.7 --with-threads--enable-shared
make&&make install
vi .bash_profile
aliaspython='/opt/python2.7/bin/python'
alias python2.7='/opt/python2.7/bin/python'
PATH=$PATH:/opt/python2.7/bin
vi /etc/ld.so.conf.d/opt-python2.7.conf /opt/python2.7/lib ldconfigsh setuptools-0.6c11-py2.7.egg cd/opt/python2.7/lib/python2.7/config ln-s ../../libpython2.7.so .