centos6.4最小化安装,运行goagent

下载goagent,解压运行,提示:’module’ object has no attribute ‘OrderedDict’

 

经搜寻得知centos6.4自带的python2.6没有那个模块,2.7才加入OrderedDict。

于是下载python2.7.5源码编译安装:

wget http://python.org/ftp/python/2.7.5/Python-2.7.5.tar.bz2 && tar jxvf Python-2.7.5.tar.bz2

进入安装:

cd Python-2.7.5 && ./configure --prefix=/usr/local/python275/ && make && make install

执行:

/usr/local/python275/bin/python2.7 /opt/goagent3/local/proxy.py

提示:No module named zlib

蛋疼……

于是下载zlib源码安装:

wget http://superb-dca3.dl.sourceforge.net/project/libpng/zlib/1.2.8/zlib-1.2.8.tar.gz && tar zxvf zlib-1.2.8.tar.gz && cd zlib-1.2.8 && ./configure && make && make install

重新编译python2.7.5:

./configure --prefix=/usr/local/python275/ --with-zlib && make && make install

再次运行:

/usr/local/python275/bin/python2.7 /opt/goagent3/local/proxy.py

提示:No module named _ssl…… 我操你乃……

安装openssl openssl-dev:

yum install openssl openssl-devel

再次编译python2.7.5:

./configure –prefix=/usr/local/python275/ –with-zlib –with-ssl && make && make install

在执行:

/usr/local/python275/bin/python2.7 /opt/goagent3/local/proxy.py

然后她提示:warning ……………… please install python-openssl……

安装:

wget http://pypi.python.org/packages/source/p/pyOpenSSL/pyOpenSSL-0.13.tar.gz –no-check-certificate && tar zxvf pyOpenSSL-0.13.tar.gz && cd pyOpenSSL-0.13 && /usr/local/python275/bin/python2.7 setup.py install

最后,创建个方便快捷的软链接吧~

ln -s /usr/local/python275/bin/python2.7 /usr/bin/python27
python27 proxy.py

goagent

上一篇
下一篇