岁月绵长,人间静好

Hey guys, Here is GouGui's Blog !

CentOS7.3安装SaltStack及配置

安装环境

准备两台机器,这两台机器都关闭selinux、防火墙。
server ==> 192.168.5.128 (服务端)
client ==> 192.168.5.129 (客户端)
开始安装
采用yum安装,还有其它安装方式,如pip、源码、salt-bootstrap
install the SaltStack repository and key

服务端安装

客户端安装

配置master

以下两种方式都可以,选择其中一种即可
# master改为服务端的主机名
master: server
# master改为服务端的IP
master: 192.168.5.128
启动saltstack服务
服务端
systemctl enable salt-master
systemctl enable salt-minion
systemctl start salt-master
systemctl start salt-minion
客户端
systemctl enable salt-minion
systemctl start salt-minion
配置认证
服务端操作

The following keys are going to be accepted:
Unaccepted Keys:
client
Proceed? [n/Y] y
Key for minion client1 accepted.
查看认证

Accepted Keys:
client
server
Denied Keys:
Unaccepted Keys:
Rejected Keys:
测试

server:
True
client:
True
远程执行命令

server:
anaconda-ks.cfg
initial-setup-ks.cfg
perl5
client:
anaconda-ks.cfg
client
initial-setup-ks.cfg
perl5

点赞

发表评论

邮箱地址不会被公开。 必填项已用*标注