A shell script support to install the latest salt on CentOS. This script has tested on min installed x86_64 CentOS 6.4.
wget https://github.com/jiangy/centos-salt-install/archive/master.zip
unzip master.zip
cd centos-salt-install-master
./install.sh
Use the following command to create the salt root directory, open the corresponding firewall ports and start salt-master.
mkdir -p /srv/salt
sed -i '/22/ a \-A INPUT -m state --state NEW -p tcp --dport 4505:4506 -j ACCEPT' \
/etc/sysconfig/iptables
service iptables restart
chkconfig salt-master on && service salt-master start
Change master value to your master in file /etc/salt/minion
, as follows:
- #master: salt
+ master: 10.0.0.1
Note: if your have more than one minion, make sure everyone has a unique hostname.
Use the following command start minion and make it auto start when server reboot.
chkconfig salt-minion on && service salt-minion start