标签:测试 pen creat 服务器 ict roo x86 hpa 依赖
部署管理服务器
第一步:先检查有没有ssh服务
[root@iZm5eeyc1al5vzh8bo57zyZ ~]# rpm -qf /etc/init.d/sshd
openssh-server-5.3p1-118.1.el6_8.x86_64
[root@iZm5eeyc1al5vzh8bo57zyZ ~]#
没有的话进行下载
ssh服务部署过程:
yum install -y openssh-server openssh-clients
yum install -y openssh*
第二步: 编写脚本创建公钥分发密钥
[root@m01 .ssh]# vim /data/jiaoben/fenfa.sh
#!/bin/bash
#create keys pair
\rm -f /root/.ssh/id_dsa*
ssh-keygen -t dsa -f /root/.ssh/id_dsa -N "" -q
yum install -y sshpass
pass_info=123456
# fenfa keys_pub
sshpass -p${pass_info} ssh-copy-id -i /root/.ssh/id_dsa.pub "-o StrictHostKeyChecking=no 10.0.0.1
sshpass -p${pass_info} ssh-copy-id -i /root/.ssh/id_dsa.pub "-o StrictHostKeyChecking=no 10.0.0.2
sshpass -p${pass_info} ssh-copy-id -i /root/.ssh/id_dsa.pub "-o StrictHostKeyChecking=no 10.0.0.3
第三步:
ansible部署(测试上)
a ansible软件安装在管理主机端
yum install -y ansible
说明:ansible软件需要依赖epel源
b ansible受控主机端进行安装
yum install libselinux-python -y
c ansible配置管理文件配置
vim tail -5 /etc/ansible/hosts
[good]
10.0.0.1
10.0.0.2
10.0.0.3
标签:测试 pen creat 服务器 ict roo x86 hpa 依赖
原文地址:https://www.cnblogs.com/xy51/p/9494741.html