????Fabric?????Python??2.5-2.7????????????SSH????ó????????????????
?????????????????????б???????shell???????/??????????????????????????????????????????е??
???????????????CentOS 6.3?????fabric?????????????????????
????1.    ????????
???????????????python?汾??????pip??fabric????????
????1.1.    Python?汾????
????CentOS 6.3?????Python?汾?2.6???????????????2.7?汾???????汾??Python???????????????????ж????е?Python???????°????
????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?汾??
????1.2.    ???pip
????Pip?????????????python????????
??????????????£?
????1. ????pip?????https://raw.github.com/pypa/pip/master/contrib/get-pip.py
????2. ??а??????
????python get-pip.py
????3. ???????????????????“????????”??
????ln -s /usr/local/python2.7/bin/pip /usr/bin/pip
????1.3.    ???fabric
????1. ??а??????
????pip install fabric
????2. ???????????????????“????????”??
????ln -s /usr/local/python2.7/bin/fab /usr/bin/fab
????2.    ?????д
?????????fabric?÷????м?????????????????ο???
????2.1.    Hello??fab
????1. ??????????????fabfile.py??????????????
????def hello():
????print("Hello fab!")
????2. ???????fab hello?????????
????# fab hello
????Hello fab!