Install installation Epel as a Yum source for installing ansible (CentOS6.4)
RPM-UVH http://ftp.linux.ncsu.edu/pub/epel/6/i386/epel-release-6-8.noarch.rpm
Install Saltstack:
Main control side:
Yum Install salt-mastster-ychkconfig Salt-master onservice Salt-master start
Controlled End:
Yum Install salt-minion-ychkconfig Salt-minion Onservice Salt-minion start
Firewall:
The main control side adds TCP 4505, 4506 port rules, the controlled side does not need to be configured, the principle is the control side directly with the main terminal zeromq to establish a long link, receive broadcast to the task information and execute
Iptables-i input-m State--state new-m tcp-p TCP--dport 4505--I input-m State--state new-m tcp-p TCP-- Dport 4506-j ACCEPT
Configuration
main control side: (Restart after configuration complete: Service salt-master restart)
"/etc/salt/master"
# bind Master Communication IP:interface:192.168.1.22# automatic authentication, avoid manually running Salt-key to confirm certificate trust auto_accept:true # Specify saltstack file directory location file_roots: Base: -/srv/salt
Tips:
The Salt-key command is required to perform certificate authentication operations when the master is not configured for auto-authentication:
# Displays the ID of the managed side that has been or is not certified # Remove all authentication host ID certificates # Delete a single ID certificate (ID is the managed End ID name) # Accept All ID certificate requests # accept a single ID certificate request (ID is the managed End ID name)
controlled end: (Restart after configuration complete: Service salt-minion restart)
"/etc/salt/minion"
# Specify Master Host IP address:master:192.168.1.22# modifies the host identification ID of the console, it is recommended to use the operating system hostname to configure the id:wx
Test: (main terminal input command)
Through the ping method of the test module, we can confirm whether the controlled end establishes trust relationship with the main terminal and whether the connectivity is normal.
' WX ' # ' WX ' is the host identification ID configured by the controlled side, and the ' * ' is used to detect all the controlled end # Results: WX: True
Saltstack Series 1: Installation Configuration