标签:sts table 执行 安全 tab 安全性 release nbsp pre
服务端(192.168.5.131)配置:
[root@localhost ~]# hostname Server [root@localhost ~]# bash [root@Server ~]# iptables -F [root@Server ~]# setenforce 0 [root@Server ~]# vim /etc/hosts 192.168.5.131 Server 192.168.5.134 Client [root@Server ~]# yum install -y epel-release [root@Server ~]# yum install -y salt-master salt-minion # 安装客户端和服务端 [root@Server ~]# echo "master: 192.168.5.131" >> /etc/salt/minion # 指定服务端 [root@Server ~]# /etc/init.d/salt-master start # 启动服务端 [root@Server ~]# /etc/init.d/salt-minion start # 启动客户端
客户端(192.168.5.134)配置:
[root@localhost ~]# hostname Client [root@localhost ~]# bash [root@Client ~]# iptables -F [root@Client ~]# setenforce 0 [root@Client ~]# vim /etc/hosts 192.168.5.131 Server 192.168.5.134 Client [root@Client ~]# yum install -y epel-release [root@Client ~]# yum install -y salt-minion # 安装客户端 [root@Client ~]# echo "master: 192.168.5.131" >> /etc/salt/minion # 指定服务端 [root@Client ~]# /etc/init.d/salt-minion start # 启动客户端
服务端管理客户端需要配置认证来保证安全性,在服务端配置如下:
[root@Server ~]# salt-key -y -a Client # 添加客户端主机名 [root@Server ~]# salt-key -y -a Server # 添加服务端主机名 [root@Server ~]# salt ‘Client‘ cmd.run ‘df -h‘ # 根据主机名测试远程执行命令,如果有多台客户端可以写成 salt ‘*‘ cmd.run ‘df -h‘
标签:sts table 执行 安全 tab 安全性 release nbsp pre
原文地址:http://www.cnblogs.com/pzk7788/p/7952928.html