标签:
一、安装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
标签:
原文地址:http://www.cnblogs.com/frankielf0921/p/5455167.html