首页 > 其他 > 详细

centos7下配置saltstack

时间:2017-12-31 22:12:55      阅读:233      评论:0      收藏:0      [点我收藏+]

1、下载

使用yum方式即可,可以更换下yum源,这里使用的阿里云的

[root@salt-master ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum -y install epel-release
yum clean all
yum makecache
yum -y install salt-master salt-minion

2、设置开机自启动服务

systemctl enable salt-minion.service 
systemctl enable salt-master.service

这里我在一台机器上安装了一个master和一个minion

3、启动服务

systemctl start  salt-master.service 
systemctl start salt-minion.service 

4、关闭防火墙

systemctl disable firewalld.service
setenforce 0

5、查看是否认证成功

修改master和minion端的配置文件,这里直接使用sed修改

sed -i s/#interface: 0.0.0.0/interface: 192.168.235.133/g /etc/salt/master
sed -i s/#master/master: 192.168.235.133/g /etc/salt/minion
sed -i s/#id/id: m1/g /etc/salt/minion

修改完成后需要重启下服务,然后再来验证是否认证成功

[root@localhost ~]# salt-key -L
Accepted Keys:
Denied Keys:
Unaccepted Keys:
m1
Rejected Keys:
[root@localhost ~]# salt-key -A
The following keys are going to be accepted:
Unaccepted Keys:
m1
Proceed? [n/Y] y
Key for minion m1 accepted.
[root@localhost ~]# salt-key
Accepted Keys:
m1
Denied Keys:
Unaccepted Keys:
Rejected Keys:
[root@localhost ~]# salt m1 test.ping
m1:
    True

 

centos7下配置saltstack

原文:https://www.cnblogs.com/Devilf/p/8158824.html

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