[root@localhost~]# tar zxvf Python-2.7.8.tgz
[root@localhostPython-2.7.8]# ./configure --prefix=/usr/local/python27
[root@localhostPython-2.7.8]# make && make install
[root@localhostPython-2.7.8]# ln -s /usr/local/python27/bin/py
[root@localhostPython-2.7.8]# ln -s /usr/local/python27/bin/python /usr/bin/
[root@localhostPython-2.7.8]# python -V
Python 2.7.8
解决yum的Python版本问题
[root@localhostPython-2.7.8]# vim /usr/bin/yum
#!/usr/bin/python2.6 Python2.6版本位置
[root@localhostPython-2.7.8]# yum
Loaded plugins: fastestmirror
You need to give some command
Usage: yum [options] COMMAND
List of Commands:
check Check for problems in the rpmdb
check-update Check for available package updates
clean Remove cached data
deplist List a package's dependencies
synchronization Synchronize installed packages to the latest available versions
downgrade downgrade a package
erase Remove a package or packages from your system