测试环境:

    OS:rhel 6.5

    Python:Python-2.7.4


一,首先升级Python

1,下载Python-2.7.4

# wget https://www.python.org/ftp/python/2.7.4/Python-2.7.4.tar.bz2

2,解压,安装Python-2.7.4

# tar xf Python-2.7.4

# cd Python-2.7.4

# ./configure --prefix=/usr/local/Python-2.7.4

# make all

# make install

# make clean

# make distclean


3,修改系统默认指向Python-2.7.4

# python -V

# mv /usr/bin/python /usr/bin/python2.6.6

# ln -sv /usr/local/Python-2.7.4/bin/python2.7 /usr/bin/python


4,查看当前的Python 版本

# python -V


5,解决系统 Python 软链接指向 Python2.7 版本后,因为yum是不兼容 Python 2.7的,所以yum不能正常工作,我们需要指定 yum 的Python版本

# vim /usr/bin/yum

        #!/usr/bin/python 

修改为

        #!/usr/bin/python2.6.6


二,安装ydcv

1, 获取ydcv 的源码包

# git clone https://github.com/felixonmars/ydcv.git

# mv ydcv/ /usr/local/


2,添加alias

# vim /etc/bashrc

        alias ydcv='/usr/local/ydcv/ydcv.py'

# source /etc/bashrc


3,使用

# ydcv transfer

                                 wKioL1c3IG3gz7O7AADGjqUNdtk333.png