CentOS7 安装Saltstack

 时间:2026-02-17 06:00:29

1、安装Saltstack

[root@linuxprobe ~]# yum -y install salt-master

[root@linuxprobe ~]# systemctl start salt-master 

[root@linuxprobe ~]# systemctl enable salt-master

# 配置防火墙规则

[root@linuxprobe ~]# firewall-cmd --add-port={4505/tcp,4506/tcp} --permanent 

success

[root@linuxprobe ~]# firewall-cmd --reload 

succes

CentOS7 安装Saltstack

CentOS7 安装Saltstack

2、# 安装salt-minion,在同一台服务器

[root@linuxprobe ~]# yum --enablerepo=epel -y install salt-minion

[root@linuxprobe ~]# sed -i 's/\#master\: salt/master\: www\.linuxprobe\.com/g' /etc/salt/minion

或者

[root@linuxprobe ~]# vi /etc/salt/minion

# 设置salt-master服务

master: www.linuxprobe.com

# master 使用域名的话需要设置本机host解析

echo "10.1.1.87 www.linuxprobe.com" >>/etc/hosts

[root@linuxprobe ~]# systemctl start salt-minion 

[root@linuxprobe ~]# systemctl enable salt-minion

# salt-master 与salt-minion连接

[root@linuxprobe ~]# salt-key -y -A

[root@linuxprobe ~]# salt-key -L 

Accepted Keys:

www.linuxprobe.com

Denied Keys:

Unaccepted Keys:

Rejected Keys:

[root@linuxprobe ~]# salt "*" test.ping 

www.linuxprobe.com:

    True

CentOS7 安装Saltstack

  • CentOS7 mini系统安装
  • CentOS7 安装GUI界面
  • Centos7 yum安装redis方法
  • Linux(CentOS7)上部署Telnet
  • CentOS7 截图
  • 热门搜索
    关于理想的手抄报内容 地理手抄报图片 我爱运动手抄报 语文手抄报五年级 放飞梦想手抄报素材 书香满园手抄报 有关春天来了的手抄报 平安出行手抄报 交通安全漫画手抄报 趣味数学手抄报