1.在nexus做salt官方的yum源代理
http://xxxx/repository/gw-yum-proxys 代理https://repo.saltproject.io/salt/py3/
2.在yum仓库里上传repo文件及salt.sh安装文件
latest.repo 文件
[salt-repo] name=Salt repo for RHEL/CentOS 7 PY3 baseurl=http://xxxx/repository/gw-yum-proxys/redhat/$releasever/$basearch/latest skip_if_unavailable=True failovermethod=priority priority=10 enabled=1 enabled_metadata=1 gpgcheck=0
salt.sh安装文件
#下载repo curl -fsSL https://xxxx/packages/initial/salt/redhat/latest.repo | sudo tee /etc/yum.repos.d/salt.repo #安装salt-minion sudo yum install -y salt-minion #修改配置文件 sudo cat <<EOF >>/etc/salt/minion.d/minion.conf master: xxxx id: `hostname -I | cut -d' ' -f1` EOF #启动salt-minion sudo systemctl start salt-minion #查看salt-minion状态 systemctl status salt-minion
3.在服务器下载salt.sh文件并执行
wget https://xxxx/packages/initial/salt/redhat/salt.sh | sh salt.sh
标签:xxxx,minion,离线,repo,sh,yum,salt From: https://www.cnblogs.com/xiaoxiaomuyuyu/p/18071030