Download URL: http://ftp.gnu.org/gnu/gdb/
1. compiling python must install development tools
# yum Groupinstall "Development tools"
2. other required modules
# yum Install Zlib-devel
# yum Install Bzip2-devel
# yum Install Openssl-devel
# yum Install Ncurses-devel
3, download, compile, install Python 2.7.3
# Tar XF python-2.7.3.tar.bz2
# CD Python-2.7.3
#./configure--prefix=/usr/local
# Make && make Altinstall
The point is altinstall instead of install, so the python just installed is here:/usr/local/bin/python2.7, and the system Python is here:/usr/bin/python and/usr /bin/python2.6.
4. Installation Configuration Setuptools
# wget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.27.tar.gz
# Tar XF distribute-0.6.27.tar.gz
# CD distribute-0.6.27
# python2.7 setup.py Install
This command generates a/usr/local/bin/easy_install-2.7 script. And this script can be used to install other Python package
# easy_install-2.7 Virtualenv
Other package can be installed similar to complete. In addition, the command line can be entered directly into the python2.7 python2.7 environment, if it is python into the 2.6.6 environment. Of course, you can also link the Python 2.7 command link to Python, and the system itself, the Python 2.6.6 changes, change the configuration file. Make an analogy.
Cd/usr/bin
RM-RF python
Ln-s/usr/local/bin/python2.7 python
After doing this, it may cause a problem that the Yum command is not available, and you need to modify Yum
Vi/usr/bin/yum
Modify the Python path for the first line #!/usr/bin/python2.6 because CentOS is used python2.6
Install Python under CentOS