ansible代码下载地址:
http://releases.ansible.com/ansible/

# git clone git://github.com/ansible/ansible.git --recursive
# cd ./ansile
# source ./hacking/env-setup
# vi /etc/profile
# source /etc/profile

# easy_install pycrypto-2.6.1.tar.gz
# yum install gcc
        Q:    src/hash_template.c:361: warning: implicit declaration of function ‘Py_FatalError’
        A:    yum install python-devel
       
       
        Q:    src/hash_template.c:361: warning: implicit declaration of function ‘Py_FatalError’
            c/_cffi_backend.c:6728: error: ‘FFI_DEFAULT_ABI’ undeclared (first use in this function)
            error: Setup script exited with error: command 'gcc' failed with exit status 1
        A:  yum install libffi-devel
            yum install openssl
            yum install openssl-devel
       
# python setup.py install
Using /usr/lib64/python2.6/site-packages
Finished processing dependencies for ansible==2.2.0
# ansible test -m ping
        Q:  DeprecationWarning
        ERROR! Unexpected Exception: 'module' object has no attribute 'HAVE_DECL_MPZ_POWM_SEC'
        the full traceback was:
        A:    wget https://pypi.python.org/packages/source/p/pip/pip-1.5.4.tar.gz --no-check-certificate
            mv pip-1.5.4.tar.gz /usr/local/src/
            cd /usr/local/src/
            tar -zxvf pip-1.5.4.tar.gz
            cd pip-1.5.4
            python setup.py install
            pip install pycrypto-on-pypi

Q:  /usr/lib/python2.6/site-packages/cryptography-1.4-py2.6-linux-x86_64.egg/cryptography/__init__.py:26: DeprecationWarning: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of cryptography will drop support for Python 2.6  DeprecationWarning
        An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'EntryPoint' object has no attribute 'resolve'
        A:    下载安装python2.7
            http://www.Python.org/ftp/python/
            mkdir /usr/local/python27
            tar xvf Python-2.7.tar.bz2
            cd Python-2.7
            ls
            ./configure --prefix=/usr/local/python27/
           
            mv /usr/bin/python /usr/bin/python2.6-0720
            make
            make install
            make clean 
            make distclean
           
            ln -s /usr/local/python27/bin/python /usr/bin/python
            vi /usr/bin/yum
                #!/usr/bin/python2.6
               
        Q:     Traceback (most recent call last):
            File "/usr/bin/ansible", line 4, in <module>
            import pkg_resources
            ImportError: No module named pkg_resources
        A:   
            cd python2.7/
            cd site
            cd site-packages/
            python get_pip.py
            ansible local -m ping
            pip install pycrypto
            pip install jinja2
            pip install paramiko
            pip install httplib2
            pip install six
            cd /usr/local/
            cd ansible/
            rm -rf *
            cd /usr/local/src/
            git clone git://github.com/ansible/ansible.git --recursive
            cp -a ansible/ /usr/local/
            rm -rf /usr/local/ansible/
            cp -ar ansible/ /usr/local/
            cd /usr/local/ansible/
            source ./hacking/env-setup
            python setup.py install
            ansible local -m ping
            Q:    ERROR!Specified hosts and/or --limit does not match any hosts
            cd /etc/
            cd ansible
            vim hosts
            [local]
            192.168.196.128      
            ansible local -m ping
            vi /etc/ansible/ansible.cfg
                参阅生产配置       
        Q:
            /usr/local/python27b/python2.7/site-packages/Crypto/Util/number.py:57: PowmInsecureWarning: Not using mpz_powm_sec.  You should rebuild using libgmp >= 5 to avoid timing attack vulnerability._warn("Not using mpz_powm_sec.  You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.", PowmInsecureWarning)
        A:    tar -xvf gmp-5.0.4.tar.bz2
            cd gmp-5.0.4
            ls
            ./configure
            make
            make check
            make install       
            pip install --ignore-installed PyCrypto

[root@vhost02 src]# ansible local -m ping
192.168.196.128 | SUCCESS => {
"changed": false,
"ping": "pong"
}
[root@vhost02 src]#

ansible 2.2的源码编译安装的更多相关文章

  1. SSH/SSL 源码编译安装简易操作说明

    环境:CentOS 6.7 安全加固需求,由于某盟扫描系统主机有SSL系列漏洞,客户要求必须修复: 解决方案:将SSH/SSL升级到最新版本,删除SSL旧版本(实测不删除旧版本某盟扫描无法通过). 当 ...

  2. 源码编译安装 MySQL 5.5.x 实践

    1.安装cmakeMySQL从5.5版本开始,通过./configure进行编译配置方式已经被取消,取而代之的是cmake工具.因此,我们首先要在系统中源码编译安装cmake工具. # wget ht ...

  3. 烂泥:mysql5.5数据库cmake源码编译安装

    本文由秀依林枫提供友情赞助,首发于烂泥行天下. 以前也写过一篇有关mysql5.0源码编译的文章,该文章为<烂泥:mysql5.0数据库源码编译安装>.但是MySQL自5.5版本以后,就开 ...

  4. Centos7.X 源码编译安装subversion svn1.8.x

    说明:SVN(subversion)的运行方式有两种:一种是基于Apache的http.https网页访问形式:还有一种是基于svnserve的独立服务器模式.SVN的数据存储方式也有两种:一种是在B ...

  5. centos6.5环境源码编译安装mysql5.6.34

    centos6.5环境源码编译安装mysql5.6.34 源码下载地址http://dev.mysql.com/downloads/mysql/5.6.html#downloads 选择Generic ...

  6. centos 6.5源码编译安装subversion 1.8.10

    一.简介 CentOS 6.5的yum源可以安装的SVN客户端版本太低了,1.6.11,所以需要升级到1.8.10,而官网有没有找到1.8.10的安装包,只能选择源码编译安装. 二.安装步骤 参考官网 ...

  7. Linux环境PostgreSQL源码编译安装

    Linux环境PostgreSQL源码编译安装 Linux版本: Red Hat 6.4 PostgreSQL版本: postgresql-9.3.2.tar.gz 数据存放目录: /var/post ...

  8. 总结源码编译安装mysql

    最近在学习源码编译安装LAMP.LNMP时,一直遇到一个难题,就是就是mysql无论怎么源码编译安装,到最后启动服务都提示"Starting MySQL.The server quit wi ...

  9. Linux下源码编译安装rpy2

    R(又称R语言)是一款开源的跨平台的数值统计和数值图形化展现工具.rpy2是Python直接调用R的第三方库,它可以实现使用python读取R的对象.调用R的方法以及Python与R数据结构转换等.这 ...

随机推荐

  1. android studio新项目时提示:Plugin is too old, please update to a more recent version

    今天想写一个程序来测试一下android studo代码,但是创建好项目后,提示: Error:(1, 0) Plugin is too old, please update to a more re ...

  2. 在IIS8添加WCF服务支持

    最近在做Silverlight,Windows Phone应用移植到Windows 8平台,在IIS8中测试一些传统WCF服务应用,发现IIS8不支持WCF服务svc请求,后来发现IIS8缺少对WCF ...

  3. 剑指offer习题集1

    1.打印二叉树 程序很简单,但是其中犯了一个小错误,死活找不到,写代码要注意啊 这里左右子树,要注意是node->left,结果写成root->left vector<int> ...

  4. postgresql数据类型转换

    PostgreSQL数据类型转换需要使用语法 alter table tbname alter column fieldname type date_type 遇到需要转换为特殊类型如DATE.BOO ...

  5. pytion学习1

    个人感觉学习一门新语言,简单的语法懂一点足矣.接下来就是编程.读懂别人程序的每一句,理解每一句的意义. #Filename:MyAddressBook.py import cPickle as p i ...

  6. oracle中的查询语句(关于出库入库信息表,明细表,把捆包箱表,单位信息表的集中查询)

    --查出所有现金中心的单位IDwith AllUnitas(select t.ORGANIZATIONID orgid,t.parentidfrom CDMS_ORGANIZATION t where ...

  7. DOCTYPE 中xhtml 1.0和 html 4.01区别分析

    前者相对于后者有以下特性: 1.所有的标记都都要闭合 所有的标记都要闭合,如果是单独不成对的标签,在标签最后加一个"/"来关闭它.例如: <h6>close tag & ...

  8. MySQL 批量插入 Update时Replace

    建一张试验表如下: 一.批量插入 MySQL的INSERT有一种写法如下: INSERT INTO person VALUES (NULL,'关羽', '2016-04-22 10:00:00'), ...

  9. nohup输入密码后继续后台运行

    Linux/Unix 是真正的多用户,多任务.Linux 提供了 fg 和bg 命令,让你轻松调度正在运行的任务. 假设你发现前台运行的一个程序需要很长的时间,但是需要干其他的事情,你就可以用 Ctr ...

  10. zabbix3.0.4监控mysql主从同步

    zabbix3.0.4监控mysql主从同步 1.监控mysql主从同步原理: 执行一个命令 mysql -u zabbix -pzabbix -e 'show slave status\G' 我们在 ...