Ansible 2.2 Source code compilation and installation

Source: Internet
Author: User
Tags gmp install openssl

Ansible Code:
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 of 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 is:
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 would 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: Download and install 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):
File "/usr/bin/ansible", line 4, <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
See Production configuration
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

[Email protected] src]# ansible Local-m ping192.168. 196.128 | SUCCESS = {"changed"false"ping " " " Pong " }[[email protected] src]#

Ansible 2.2 Source code compilation and installation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.