Saltstack installation and certification
Preparatory work:
1. Two machines: 192.168.141.250 192.168.141.249
two。 Set up hostname and hostes
Vim / etc/sysconfig/network # set hostname,HOSTNAME=web12.limingyu.comvim / etc/hosts192.168.141.249 web13.limingyu.com192.168.141.250 web12.limingyu.com# to modify these two items, save and exit after modification, restart the system, and let hostname take effect to ensure that the two machines can communicate with ping. Ping web13.limingyu.com
3. Turn off selinux and clear firewall rules
Start the installation:
Web12 machine: yum install-y epel-release yum install-y salt-master salt-minion web13 machine: yum install-y epel-release yum install-y salt-minion # modify salt-minion configuration on two machines vim / etc/salt/minion master: 192.168.141.250 # modify line 16 Configure master address # Boot web12 machine: / etc/init.d/salt-master start / etc/init.d/salt-minion start web13 machine: / etc/init.d/salt-minion start # you can also add them all to boot chkconfig salt-minion on
Certification:
Salt-key # can view authentication information salt-key-A # all authentication salt-key-d # delete authentication
Test:
Salt'* 'test.ping web12.limingyu.com: Trueweb13.limingyu.com: True# salt' * 'cmd.run' uptime'web12.limingyu.com: 01:51:15 up 5:11, 1 user, load average: 0.15,0.11, 0.07web13.limingyu.com: 01:51:16 up 5:11, 1 user, load average: 0.03,0.05,0.05