新加了几台机器,方便以后管理,全部装上salt minion。
1、saltstack的yum源的添加
cat > /etc/yum.repos.d/saltstack.repo << EOF
[saltstack]
name=SaltStack repo for RHEL/CentOS \$releasever
baseurl=https://repo.saltstack.com/yum/redhat/\$releasever/\$basearch/latest
enabled=1
gpgcheck=1
gpgkey=https://repo.saltstack.com/yum/redhat/\$releasever/\$basearch/latest/SALTSTACK-GPG-KEY.pub
EOF
2、清理并建立元数据缓存
yum clean all && yum makecache
3、安装minion
yum install salt-minion -y
4、修改minion配置文件
vi minion ID填写主机名
master: yum.ops.net
id: DT-WH-1-11
tcp_keepalive: True
tcp_keepalive_idle: 300
tcp_keepalive_cnt: -1
tcp_keepalive_intvl: -1
5、启动服务并检查
/etc/init.d/salt-minion start
chkconfig salt-minion on
6、去master上测试
完成安装
来源:51CTO
作者:aiqinghai18596
链接:https://blog.51cto.com/9307412/2160985