Ansible Study Summary

Source: Internet
Author: User

1: Installation

Installing dependent libraries

Yum install-y zlib Zlib-devel

Yum Install-y OpenSSL Openssl-devel


Source Code Compilation installation py

#编译安装python2.7

Mkdir-p/USR/LOCAL/SRC/PYTHON_SRC

Cd/usr/local/src/python_src

wget http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tar.bz2

TAR-XF python-2.7.5.tar.bz2

CD Python-2.7.5

./configure--prefix=/usr/local/python2.7

Make && make install

echo "Path=/usr/local/python2.7/bin: $PATH" >>/etc/profile

Source/etc/profile

#查看python版本

Python-v

Return to Python 2.7.5


Compiling and installing Setuptools

Mkdir-p/USR/LOCAL/SRC/PYTHON_SRC

Cd/usr/local/src/python_src

wget https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gz#md5= 13951be6711438073fbe50843e7f141f--no-check-certificate

TAR-XF setuptools-1.4.2.tar.gz

CD setuptools-1.4.2

Python setup.py Install


Compile and install Pip

Mkdir-p/USR/LOCAL/SRC/PYTHON_SRC

Cd/usr/local/src/python_src

wget https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz--no-check-certificate

TAR-XF pip-1.4.1.tar.gz

CD pip-1.4.1

Python setup.py Install


Attention:


Setuptools must be installed. Otherwise report when running this step


Importerror:no module named Setuptools


#运行pip模块查看

# PIP List

Pip (1.4.1)

Setuptools (1.4.2)

Wsgiref (0.1.2)


Pip Install ansible Plugin

Pip install Paramiko Pyyaml jinja2 httplib2

Pip Install Ansible



If you run an error after installation: Attributeerror: ' Module ' object has no attribute ' have_decl_mpz_powm_sec '

Pip Install Pycrypto-on-pypi

View the version of Ansible

Ansible--version

Ansible 1.7.2


Installing Ansible-shell

Https://github.com/dominis/ansible-shell

Pip Install Ansible-shell




#创建一个python的链接

Ln-sf/usr/local/python2.7/bin/python/usr/bin/python



Then modify the python2.6 in Yum

Vim/usr/bin/yum


The first line should read

#!/usr/bin/python2.6

2. Machine Trust

192.168.1.61 on

Ssh-keygen-t rsa-f ~/.ssh/id_rsa

Ssh-copy-id-i id_rsa.pub [Email protected]*

You can use the ansible to manipulate something later.


This article from "Welcome to the Radiant" blog, declined reprint!

Ansible Study Summary

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.