最新 包的下载地址:

https://repo.saltstack.com/#rhel

Centos7的安装方法:

开始如下:

#导入SaltStack仓库key:

wget https://repo.saltstack.com/yum/rhel7/SALTSTACK-GPG-KEY.pub

rpm --import SALTSTACK-GPG-KEY.pub

rm -f SALTSTACK-GPG-KEY.pub

cd /etc/yum.repos.d

wget

内容如下:也可以看附件

##############

[saltstack-repo]

name=SaltStack repo for Red Hat Enterprise Linux $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

       https://repo.saltstack.com/yum/redhat/$releasever/$basearch/latest/base/RPM-GPG-KEY-CentOS-7

####################

yum install salt-minion -y

cd /etc/salt/

echo "master: 10.168.182.152" >> minion

###开机启动

systemctl enable salt-minion.service

systemctl start salt-minion.service

##########################################################################

试验环境:salt-master cetnos6  192.168.1.107

          salt-minion redhat6  192.168.1.108(主机名a.com)

对于master:

 

yum install https://repo.saltstack.com/yum/redhat/salt-repo-latest-1.el6.noarch.rpm

 

 # yum install salt-master

 #  netstat -ntlp

在/etc/salt/master下加入

#自动接收秘钥

auto_accept: True

 4505端口

 #  chkconfig --list|grep salt

 # /etc/init.d/salt-master start

 # salt-key -L           发现a.com没有被验证通过

 # salt-key -a a.com                  添加a.com的验证

 # salt '*' cmd.run "ifconfig"

对于minion:

 #wget -c http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

  #rpm -ivh epel-release-6-8.noarch.rpm 

 # yum install salt-minion

#cd /etc/salt/

#vim minion

冒号后面要空格不然会报错

#/etc/init.d/salt-minion start

#netstat -antlp 

2207端口

-------------------------------------------------------

如果出现无法yum install:

vi /etc/yum.repos.d/epel.repo

将所有baseur的注释去掉

mirrorl开头的注释就ok了.