saltstack------安装篇

一、环境准备

系统:centos7   and centos6.8

IP 系统
172.16.1.10 centos7

172.16.1.11  

centos7
172.16.1.21 centos6.8

二、开始安装

安装yum源

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

 

安装epel-release工具
yum install epel-release -y

 

 
在master上安装
yum install salt-master -y

 

在minion安装
yum install salt-minion -y

 

修改minion端配置文件
vim /etc/salt/minion
master: slat
id: 11 (唯一)

 

修改minion的hosts文件
172.16.1.10 salt
启动master
systemctl start salt-master
systemctl enable salt-master

 

启动minion
systemctl start salt-minion
systemctl enable salt-minion

 

master常用的命令参数
salt-key -a(添加某台机器) -A(添加所有) -d(删除某台机器) -D(删除所有) -y(自动添加yes) -L(查看列表)

 

测试master与minion的连通性
salt "*" test.ping

显示所有为Turn为成功

到此处安装完成!

 
posted @ 2018-09-06 11:21  天府熊大  阅读(215)  评论(0编辑  收藏  举报