CentOS ansible Installation Configuration

Source: Internet
Author: User
Tags gmp

About ansible do not do more company, directly start the installation configuration

" Installation Environment"

[Email protected] ~]# cat/etc/centos-release CentOS release 6.5 (Final) [[email protected] ~]# Uname-alinux Ansibleserve R 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 03:15:09 UTC x86_64 x86_64 x86_64 gnu/linux

Install operating system Dependency packages

[[Email protected] ~] #yum install-y python-setuptools python-devel gmp-devel gcc java-1.7.0-openjdk unzip Svnkit

Download Libyaml and install

[[Email protected] ~] #wget http://pyyaml.org/download/libyaml/yaml-0.1.5.tar.gz[[email protected] ~] #tar-ZXVF Yaml-0.1.5.tar.gz[[email protected] ~] #cd yaml-0.1.5[[email protected] yaml-0.1.5]#./configure[[email protected] yaml-0.1.5] #make [[email protected] yaml-0.1.5] #make Install

Download Python dependency Package and install

[[email protected] ~] #wget  https://pypi.python.org/ Packages/source/m/markupsafe/markupsafe-0.23.tar.gz[[email protected] ~] #tar  -zxvf  Markupsafe-0.23.tar.gz[[email protected] ~] #cd  MarkupSafe-0.23[[email protected]  MARKUPSAFE-0.23] #python  setup.py install The following same execution [[email protected] ~] #https:// Pypi.python.org/packages/source/p/paramiko/paramiko-1.15.2.tar.gz[[email protected] ~] #https:// Pypi.python.org/packages/source/e/ecdsa/ecdsa-0.13.tar.gz[[email protected] ~] #https:// Pypi.python.org/packages/source/p/pycrypto/pycrypto-2.6.1.tar.gz[[email protected] ~] #https:// Pypi.python.org/packages/source/d/distutils2/distutils2-1.0a4.tar.gz[[email protected] ~] #https:// Pypi.python.org/packages/source/p/pyyaml/pyyaml-3.11.tar.gz[[email protected] ~] #https:// Pypi.python.org/packages/source/j/jinja2/jinja2-2.8.tar.gz 

Download ansible and install

Here we compile the installation [[email protected] ~] #wget  https://github.com/ansible/ansible/releases/download/ V2.0.0.1-1/ansible-2.0.0.1.tar.gz can also choose a different version  https://github.com/ansible/ansible[[email protected]  ~] #tar  -zxvf ansible-2.0.0.1.tar.gz[[email protected] ~] #python  setup.py  Install[[email protected] ~] #mkdir  -p /etc/ansible[[email protected] ~] #cp   -rp examples/*  /etc/ansible/executes the following 3 commands, if all can be executed, indicating ansible installation success! Ansibleansible-playbookansible-doc Note: Starting with version 1.8, you need to download the module separately (note that the module version must match the ansible version, otherwise the execution may appear inexplicably asked ( It is recommended to refer to the version on GitHub before selecting) We first check if there is a corresponding module, if you do not want to add [[email protected] modules]# cd /usr/lib/ python2.6/site-packages/ansible-2.0.0.1-py2.6.egg/ansible/modules[[email protected] modules]#  Lscore  extras  __init__.py  __init__.pyc which core extras  is a module that has been added, If the [[Email protected] modules] #git is not added as follows  CLONE HTTPS://GITHUB.COm/ansible/ansible-modules-core/tree/stable-2.0.0.1 core[[email protected] modules] #git   Clone https://github.com/ansible/ansible-modules-extras/tree/stable-2.0.0.1 extras

Next we configure the Ansibleserver connectivity Nod1



Configure SSH Key Trust , of course ansibles can also login with a password

Add/etc/hosts host name and address [[email protected] ~]# vi/etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6192.168.81.129 NOD1 generation SSH key [[email protected] ~]# ssh-keygen-t rsa[[email protected] ~]# ssh-copy-id-i ~/.ssh/id_rsa [email protected] authentication [[Emai L protected] ~]# ssh nod1last login:fri Mar 18:07:17 from 192.168.81.128[[email protected] ~]# exit

Configure Ansible

[Email protected] ~]# vi/etc/ansible/hosts[test]nod1[[email protected] ansible]# ansible test-m pingNOD1 | SUCCESS = {"Changed": false, "ping": "Pong"}

Issue record:

[[email protected] ~]# ansible test-m Ping

/usr/lib64/python2.6/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)

NOD1 | SUCCESS = {

"Changed": false,

"Ping": "Pong"

}


It means that the system comes with GMP library version is too low, need to upgrade to GMP 5.x

Handle as follows

1, go to  http://ftp.gnu.org/gnu/gmp/  download the latest version and unzip #cd /tmp#wget http://ftp.gnu.org/gnu/gmp/ GMP-5.1.3.TAR.BZ2#TAR XJVF GMP-5.1.3.TAR.BZ2#CD GMP-5.1.3#./CONFIGURE#MAKE#MAKE INSTALL4, Join  ldconfig#echo  "/usr/local/lib"  >> /etc/ld.so.conf.d/gmp.conf#ldconfig5 to confirm that you have joined # strings /etc/ld.so.cache|grep gmplibgmpxx.so.4/usr/lib64/libgmpxx.so.4libgmp.so.10/usr/local/lib/ LIBGMP.SO.10LIBGMP.SO.3/USR/LIB64/LIBGMP.SO.3LIBGMP.SO/USR/LOCAL/LIB/LIBGMP.SO6, reinstall  pycrypto we need to install pip# first. wget --no-check-certificate https://github.com/pypa/pip/archive/1.5.5.tar.gz#tar zvxf  1.5.5.tar.gz     #解压文件 #cd pip-1.5.5/#python  setup.py  Install and then use PIP to reinstall Pycrypto#pip uninstall pycrypto#pip install pycrypto after completion warning is dismissed. # ansible test -m pingnod1 | success => {     " Changed ": false,     " ping ": " PONg "} 

The above is the CentOS ansible installation configuration, the next section we configure Ansible-playbook

This article is from the "xiangcun168" blog, make sure to keep this source http://xiangcun168.blog.51cto.com/4788340/1755125

CentOS ansible Installation Configuration

Related Article

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.