salt系列之安裝

 簡介:

 

  1. Salt is: 
  2. • a configuration management system, capable of maintaining remote nodes in defined states (for example, ensuring 
  3. that specific packages are installed and specific services are running) 
  4. • a distributed remote execution system used to execute commands and query data on remote nodes, either individually 
  5. or by arbitrary selection criteria 

前提:已安裝epel第三方源;

 
1,at master
 
  1. echo "master_IP     master_hostname" >> /etc/hosts 
  2. echo "slave_IP     slave_hostname" >> /etc/hosts 
  3. yum install salt -y 
  4. yum install salt-master -y 
  5. yum install salt-minion -y 
配置文件所在目錄:/etc/salt
主要包括master,minion
修改master裏面的interface
 
  1. #interface:  0.0.0.0 
  2. interface: master_IP 
-------------------
修改minion裏面的master
 
  1. #master: salt 
  2. master: master_IP 
-------------------
 
  1. /etc/init.d/salt-master start 
  2. /etc/init.d/salt-minion start 
+++++++++++++++++++++++++
2,at client
 
  1. echo "master_IP     master_hostname" >> /etc/hosts 
  2. echo "slave_IP     slave_hostname" >> /etc/hosts 
  3. yum install salt -y 
  4. yum instal salt-minion -y 
--------------------
配置文件所在目錄:/etc/salt
-------------------
修改minion裏面的master
 
  1. #master: salt 
  2. master: master_IP 
-------------------
 
  1. /etc/init.d/salt-minion start 
++++++++++++++++++++++++++++++++
3,key 管理
salt-key -L   ----------------查看key全部信息
salt-key -a xxx   -----------批准xxx的認證
salt-key -A   ---------------批准客戶端全部的認證請求
 
4,注意selinux關閉,防火牆端口4505,4506要開啓
-A RH-Firewall-1-INPUT -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 4505 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 4506 -j ACCEPT
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章