您的位置:首页 > 其它

salt 001

2015-06-17 14:39 225 查看
saltstack
安装
1:rpm
# centos 6 下载下面rpm
wget -O epel.rpm http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm ## 安装epel
rpm -Uvh epel.rpm
yum -y install salt-master or yum -y install salt-minion

配置
master (控制端)
;;
;;
minion
;;
;;

测试
接受salt-minion的认证请求(在master执行)
[root@localhost ~]# salt-key -L ;;list key
Accepted Keys: ;;已允许
hahala
Denied Keys: ;;拒绝
Unaccepted Keys: ;;未允许 master和minion联通的话,minion的id会出现在这里,如果没有出现,请配置或关闭防火墙,并重启服务
hahaha
Rejected Keys:

[root@localhost ~]# salt-key -a hahaha ;; -a 允许单个 -A 允许所有 -y yes -d 删除单个(Acceptd) -D 删除所有
The following keys are going to be accepted:
Unaccepted Keys:
hahaha
Proceed? [n/Y] y
Key for minion hahaha accepted.

[root@localhost ~]# salt 'hahaha' test.ping
hahaha:
True

联通OK。

p.s. 有时间再翻 master和minion的配置

本文出自 “温柔” 博客,请务必保留此出处http://dangyibo.blog.51cto.com/4219248/1662737
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: