centos6默认python2.6升级2.7 卸载python2.6升级2.7

转自:http://www.jb51.cc/article/p-sklmgice-ee.html

1.下载Pyhon,选择下载Gzipped source tar ball (2.7.6) (sig)
网址https://www.python.org/download/releases/2.7.6
2.解压安装,命令如下
tar -xvf Python-2.7.6.tgz
cd Python-2.7.6
./configure –prefix=/usr/local/python2.7
make
make install
3.创建链接来使系统默认python变为python2.7
ln -fs /usr/local/python2.7/bin/python2.7 /usr/bin/python
4.查看Python版本
python –V
5.修改yum配置(否则yum无法正常运行)
vi /usr/bin/yum
将第一行的#!/usr/bin/python修改为系统原有的python版本地址#!/usr/bin/python2.6

至此CentOS6.3系统Python已成功升级至2.7.6版本

参考:
http://www.centoscn.com/image-text/config/2015/0325/5005.html
http://www.cnblogs.com/dudu/p/4294238.html

相关文章

#使用军哥的lnmp配置虚拟主机,需要注意的是要配置hosts文件(...
一、配置编译环境 yum update && yum upgra...
一、下载repo文件 二、备份并替换系统的repo文件 三、执行yu...
LAMP -- Linux Apache MySQL PHP 在CentOS安装的顺序,我一般...
一、下载nginx安装包,官网下载中心http://nginx.org/downlo...
1.下载composer curl -sS https://getcomposer.org/installe...