1. Installation
#yum install salt-master-y or yum install Salt-minion-y
#chkconfig Salt-master on
#service Salt-master Start
2. Firewall configuration
#iptables-I input-m State--state new-m tcp-p TCP--dport 4505-j ACCEPT
....................................................................................... 4506 ........
No firewall rules to be configured on the controlled side
3, modify the host configuration, and then restart the service
#vim/etc/salt/master
interface:192.168.1.20 #绑定Master通信IP
Auto_accpet:true #自动认证, avoid manually running Salt-key to confirm certificate Trust
File_roots: #指定salt文件根目录位置
Base
-/srv/salt
4. Modify the configuration of the controlled terminal and restart the service
#vim/etc/salt/minion
master:192.168.1.20 #指定master主机IP地址
Id:mycentos #修改被控端主机识别id, it is recommended to use the operating system hostname to configure
5. Verifying the installation results
#salt ' Mycentos ' test.ping
Mycentos:
True
-----------------------------------------------------------------------
When/etc/salt/master is not configured for auto_accept:true, it is necessary to perform certificate authentication operations with the Salt-key command, as follows:
- SALT-KEY-L displays an already or uncertified controlled end id,accepted keys as a certified list, unaccpetd keys as an uncertified list;
- Salt-key-d Remove all authentication host ID certificates
- salt-key-d ID Delete a single ID certificate
- SALT-KEY-A Accept All ID certificate requests
- SALT-KEY-A ID accepts a single ID certificate request
If there is a problem, you can use Salt-master-l Debug or salt-minion-l debug for troubleshooting When you start the service
Centralized management platform Saltstack installation configuration