码迷,mamicode.com
首页 > 编程语言 > 详细

CentOS5.8 升级python至2.6.6 并安装ansible

时间:2015-08-19 17:25:08      阅读:1269      评论:0      收藏:0      [点我收藏+]

标签:python升级   ansible   

yum install openssl openssl-devel


tar jxvf Python-2.6.6.tar.bz2 

cd Python-2.6.6

./configure

make && make install


[root@relearn ~]# python

Python 2.6.6 (r266:84292, Aug 19 2015, 14:08:38) 

[GCC 4.1.2 20080704 (Red Hat 4.1.2-55)] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> 


install python-setuptools

wget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py

python ez_setup.py --insecure


easy_install pip

pip install paramiko PyYAML Jinja2 httplib2 six


pip install ansible


yum install python-simplejson -y

yum install libselinux-python -y



ansible执行的时候会按照以下顺序查找配置项:


* ANSIBLE_CONFIG (环境变量)

* ansible.cfg (当前目录下)

* .ansible.cfg (用户家目录下)

* /etc/ansible/ansible.cfg


本文出自 “态度决定一切” 博客,请务必保留此出处http://relearn.blog.51cto.com/2605709/1685970

CentOS5.8 升级python至2.6.6 并安装ansible

标签:python升级   ansible   

原文地址:http://relearn.blog.51cto.com/2605709/1685970

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!