zoukankan      html  css  js  c++  java
  • ansible之一:安装与配置

    ansible特点:

    1、不需要安装客户端,通过sshd去通信

    2、基于模块工作,模块可以由任何语言开发

    3、不仅支持命令行试用模块,也支持yaml格式得playbook

    4、支持sudo

    5、有提供UI(浏览器图形化)www.ansible.com/tower 10台主机以内免费

    6、开源UI https://github.com/alaxli/ansible_ui

    ansibel安装:

    2台机器 192.168.0.8 192.168.0.9

    只需要在192.168.0.8上安装ansible即可

    #yum install -y epel-release

    #yum install -y ansible

    ansible 配置密钥

    192.168.0.8 上生产密钥对

    #ssh-keygen -t rsa 直接回车即可,不用设置密码密码。

    把公钥(id_rsa.pub)内容放到对方机器(09)得/root/.ssh/authorized_keys文件里面

    #scp .ssh/id_rsa.pub 192.168.0.9:/root/.ssh/ authorized_keys

    本机也要操作

    #cat /root/.ssh/id_rsa.pub>>/root/authorized_keys

    #chmod 600 /root/.ssh/authorized_keys

    *关闭selinux 

    #setenforce 0

    测试密钥设置

    #ssh 192.168.0.9

  • 相关阅读:
    爬取东方财富财报
    Excel自动填充功能
    解决sqlalchemy连接数据库出现的报错
    mysql常用技巧
    Linux常用命令
    my python day7
    my python day6
    my python day5
    my python day4
    Java反射技术概述
  • 原文地址:https://www.cnblogs.com/chenjiahe/p/5616982.html
Copyright © 2011-2022 走看看