Centos5.5升级Python
1、下载python2.5.4:
wget Http://www.Python.org/ftp/python/2.5.4/Python-2.5.4.tar.bz2
2、安装Python:
tar xvf Python-2.5.4.tar.bz2
cd Python-2.5.4
./configure
make all
make install
make clean
make distclean
3、修改系统链接:
mv /usr/bin/python /usr/bin/python.bak
ln -s /usr/local/bin/python2.5 /usr/bin/python
4、修改yum配置,系统默认yum使用的是2.4的版本,要修改yum配置文件使用python2.4
vi /usr/bin/yum
#!/usr/bin/python 修改为: #!/usr/bin/python2.4
相关文章