Python fabric????????????
???????????? ???????[ 2014/7/15 13:58:20 ] ????????Python ????????????
????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!
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11