回顾:扩展源只能存在一个,当打算安装第二个需要删除第一个,rpm -e epel-release --- 小 Q
-----------------------------------------------------------------------------------------------------
python2.7安装
环境:centos 6.5
wget https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz
tar xvzf Python-2.7.8.tgz
cd Python-2.7.8
./configure --prefix=/usr/local
make --jobs=`grep processor/proc/cpuinfo | wc -l`
make install
## 将python头文件拷贝到标准目录,以避免编译ansible时,找不到所需的头文件
cd /usr/local/include/python2.7
cp -a ./* /usr/local/include/
## 备份旧版本的python,并符号链接新版本的python
cd /usr/bin
mv python python2.6
ln -s /usr/local/bin/python
## 修改yum脚本,使其指向旧版本的python,已避免其无法运行
vim /usr/bin/yum
!/usr/bin/python --> #!/usr/bin/python2.6