Build saltstack
A server a client
1. Set the hostname
hostnamectl the SET-server hostname saltstack
hostnamectl set-hostname client client
2. Close SElinux
# server and client must be configured with
vim / etc / selinux / config
will SELINUX = enforcing
into SELINUX = disabled
3. Edit the hosts file
# server and client must be configured
vi / etc / hosts
inside Add
192.168.1.123 saltstrack
192.168.1.124 Client
4. Add epel source
# server and client must be configured with
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
5. Installation
yum -y install salt-master salt- minion server
yum -y install salt-minion client
6. Configure Master
# server and client must be configured
vi / etc / Salt / Minion
+16: Master: hostname / ip
+78: the above mentioned id: hostname
7. Start the service server
systemctl enable Salt-Master
systemctl enable Salt-Minion
systemctl Start Master Salt-
systemctl Start-Minion Salt
8. Start the client service
systemctl enable Salt-Minion
systemctl Start Salt-Minion
9.vim / etc / salt / minion client
add master: server ip
the above mentioned id: client hostname
10. Close the firewall
service firewalld stop server
11. Close SElinux
the setenforce 0
12. Restart service
systemctl restart salt-minion client
The display of all public keys
salt-key -L
14. Key to accept all waiting
Salt-Key -A
the Proceed? [n / y] y
The display of all public keys
salt-key -L
16. detect whether communication is normal
salt '*' test.ping