1.准备编译环境
yum groupinstall ‘Development Tools’
yum install zlib-devel bzip-devel openssl-devel ncurses-devel
2.安装Python2.7
https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz
tar -zxvf
./configure –prefix=/usr/local/Python2.7
make install
备份旧版
cd /usr/bin
mv python python2.6
新版软连接
ln -s /usr/local/bin/python
修改yum脚本,用新版无法运行
vim /usr/bin/yum
!/usr/bin/python2.6
3.安装setuptools模块
https://pypi.python.org/packages/source/s/setuptools/setuptools-7.0.tar.gz
tar -zxvf setuptools-7.0.tar.gz
cd setuptools-7.0
python setup.py install
4.安装pycrypto模块
https://pypi.python.org/packages/source/p/pycrypto/pycrypto-2.6.1.tar.gz
tar -zxvf pycrypto-2.6.1.tar.gz
cd pycrypto-2.6.1
python setup.py install
5.安装PyYAML模块
http://pyyaml.org/download/libyaml/yaml-0.1.5.tar.gz
tar -zxvf yaml-0.1.5.tar.gz
cd yaml-0.1.5
./configure –prefix=/usr/local/yaml-0.1.5
make install
https://pypi.python.org/packages/source/P/PyYAML/PyYAML-3.11.tar.gz
tar xvzf PyYAML-3.11.tar.gz
cd PyYAML-3.11
python setup.py install
6.安装Jinja2模块
https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.9.3.tar.gz
tar xvzf MarkupSafe-0.9.3.tar.gz
cd MarkupSafe-0.9.3
python setup.py install
https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.7.3.tar.gz
tar xvzf Jinja2-2.7.3.tar.gz
cd Jinja2-2.7.3
python setup.py install
7、paramiko模块安装
https://pypi.python.org/packages/source/e/ecdsa/ecdsa-0.11.tar.gz
tar xvzf ecdsa-0.11.tar.gz
cd ecdsa-0.11
python setup.py install
https://pypi.python.org/packages/source/p/paramiko/paramiko-1.15.1.tar.gz
tar xvzf paramiko-1.15.1.tar.gz
cd paramiko-1.15.1
python setup.py install
8、simplejson模块安装
https://pypi.python.org/packages/source/s/simplejson/simplejson-3.6.5.tar.gz
tar xvzf simplejson-3.6.5.tar.gz
cd simplejson-3.6.5
python setup.py install
9、ansible安装
https://github.com/ansible/ansible/archive/v1.7.2.tar.gz
tar xvzf ansible-1.7.2.tar.gz
cd ansible-1.7.2
python setup.py install
ansible配置
mkdir -p /etc/ansible
vim /etc/ansible/ansible.cfg
……
remote_port = 36000
private_key_file = /root/.ssh/id_rsa_storm1
……
主机组定义
vim /etc/ansible/hosts
[storm_cluster]
10.223.55.100
10.223.55.101
10.223.38.226
10.223.38.227
10.223.39.216
10.223.25.123