Install saltstack install EPEL third-party software source wget-c http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpmrpm-ivh epel-release-6-8.noarch.rpm install yum install salt-master-y // masteryum install salt-minion // clients chkconfig -- list | grep salt // The master listens to two ports by default, 4505 (publish_port) is the message publishing system of salt, and 4506 (ret_port) is the port on which the salt client communicates with the server, so make sure that the client can communicate with the two ports of the server salt-master 0: off 1: off 2: off 3: on 4: on 5: on 6: offsalt-syndic 0: off 1: off 2: off 3: on 4: on 5: on 6: offchkconfig -- list | grep salt // clients no port, only the process salt-minion 0: off 1: off 2: off 3: on 4: on 5: on 6: off configuration/etc/init. d/salt-master start // master to start directly. If you want to use it as clients, install salt-minino and modify master and idvi/etc/salt/minion // clientsmaster: 192.168.2.18 // there is a space behind the colon/etc/init. d/salt-minion start authentication salt-key-L // all list details salt-key -- help real-time management salt "localhost. localdomain "cmd. run "df-Th" localhost. localdomain: filesystem Type Size Used Avail Use % Mounted on/dev/mapper/VolGroup-lv_root ext4 19G 6.5G 11G 38%/tmpfs 244 M 0 244 M 0%/dev/shm/dev/sda1 ext4 485 M 40 M 420 M 9%/boot group salt "*" cmd. run "ls-al/opt/io. sh "localhost. localdomain:-rwxr-xr-x 1 root 396 Jun 8 18:22/opt/io. sh filter matches salt' 192. 168. * 'COMMAND. run 'echo Hi'. Normally, the HOSTS of each host is like this: 127.0.0.1 localhost. localdomain localhost4 localhost4.localdomain4: 1 localhost. localdomain localhost6 localhost6.localdomain6 in order to distinguish and MASTER is also used as the client vi/etc/salt/minion 39 id: 192.168.2.18 // or modified to a custom name such as id: salt-master, after the id is modified, the client must be restarted, and salt-keys-L can be recognized and added to-a. If the ID is modified, it is best to delete the old-dsalt-key-D // Delete All KEYsalt-key-d key // delete A single keysalt-key-a // accept all KEYsalt-key-A key // accept a single key [root @ server1 salt] # salt-key-LAccepted Keys: unaccepted Keys: 192.168.2.18192.168.2.19Rejected Keys: [root @ server1 salt] # salt-key-a 192.168.2.18Key for minion 192.168.2.18 accepted. [root @ server1 salt] # salt-key-a 192.168.2.19Key for minion 192.168.2.19 accepted. [root @ server1 salt] # salt-key-LAccepted Keys: 192.168.2.18192.168.2.19Unaccepted Keys: Rejected Keys: test the salt communication between the server and the client "192.168.2.19" test. ping // single quotes can also be 192.168.2.19: Truesalt "*" salt. modules. disk // salt. modules. disk module group server: vi/etc/salt/masternodegroups: mytest1:'s @ 192.168.2.0/24 'Salt-N mytest1 test. ping192.168.2.18: Trueclient1_2.19: True KEYS name nodegroups: test1: 'l @ 192.168.2.18, client1_2.19 '// multiple test2: 'client1 _ 100' // a single