Pre-installation Required environment: 2.6.6<pythin<3.x
This article is to refer to the Chinese Saltstack user group inside the Salt Chinese manual installation content after the practice summary.
Beginners can learn to install with Ubuntu system because the salt is easy to install on Ubuntu. The Salt Chinese manual has the installation method, can be installed directly, is not described here.
1. Before installing, we need to set the port to open the firewall, salt need to use 4505 and 4506 port
2.master/minions need to install some dependencies first
Yum install zeromq pycrypto m2crypto python-msgpack pyyaml python-jinja2 python-markupsafe python-libcloud-y
3. End Installation
Server-side Installation
Yum Install Salt-master-y
Installation of the controlled end
Yum Install Salt-minion-y
1. Start the server side and close it later (only after the boot, the salt profile will appear before you can edit the configuration file)
Service salt-Master StartService Salt-master stop
2. The configuration file is generated and the configuration file is modified
(1) Server-side
Vim/etc/salt/master +14
Modify
#interface: Master
interface:10.10.10.111
Uncomment 283,284,285 lines, here is the resource file setting salt, the directory location of the SLS files
file_roots: Base: -/srv/salt
Set up boot from
Chkconfig Salt-master on
(2) Controlled end
Vim Etc/salt/minion
Modify the following: the IP address of master is modified below
# About 15 rows or so. # Master:saltmaster:10.10.10.111# around 54 lines #ID:id:minionname
Restarting the salt service, because of commands executed with a Python script, the restart command is not formatted as a manual restart.
# Set boot chkconfig salt-minion on# script Restart service /bin/systemctl restart Salt-minion.service
Salt installation Method (CentOS)