首页 > 其他 > 详细

ansible安装和配置

时间:2016-05-03 16:10:09      阅读:181      评论:0      收藏:0      [点我收藏+]

一、安装ansible准备

//安装准备

1.两台机器

172.7.15.106    

172.7.15.111

2.设置hostname以及hosts

172.7.15.106 web9.lulu.com

172.7.15.111 web10.lulu.com
 
3. 安装ansible (只需要在106--server端安装)
[root@web9 ~]# yum install -y epel-release
[root@web9 ~]# yum install -y ansible

 

二、安装ansible

//106

[root@web9 ~]# ssh-keygen -t rsa      //直接回车生成密钥对
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): //此处输入密码
Enter passphrase (empty for no passphrase):

[root@web9 ~]# scp .ssh/id_rsa.pub 172.7.15.111:/root/ssh/authorized_keys
[root@web9 ~]# cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized.keys
[root@web9 ~]# chmod 600 /root/.ssh/authorized.keys
[root@web9 ~]# setenforce 0
[root@web9 ~]# iptables -F

 

ansible安装和配置

原文:http://www.cnblogs.com/frankielf0921/p/5455167.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!