I just tested installing Python 2.3 with zlib support on one of our CentOS 6 servers and was able to do it as follows (installing everything into ~/python):mkdir ~/src ~/pythoncd ~/srcwget http://zlib.net/zlib-1.2.5.tar.bz2tar xjf zlib-1.2.5.tar.bz2cd zlib-1.2.5./configure --prefix=$HO...【阅读全文】
用fabric部署文件到远程服务器时,遇到 sudo: sorry, you must have a tty to run sudo 这个错误。如果从远程服务器端处理很容易,打开tty即可,但是既然ssh 有-t ,允许 Pseudo-tty Allocation ,那么 Paramiko 难道就没有? 后来一查,果然有啊,stdin,stdout,stderr=ssh.exec_command(cp_war_cm...【阅读全文】