cent0S 7 安装 cdh5.13 笔记之一:

安装saltstack minion


客户机1台 (vm-repo.pepstack.com  192.168.122.18):

/etc/hosts


192.168.122.223 cent7-clone  n1  cent7-n1.pepstack.com
192.168.122.224 cent7-clone1 n2 cent7-n2.pepstack.com
192.168.122.225 cent7-clone2 n3 cent7-n3.pepstack.com


节点机3台,安装软件如下:


n1 cent7-clone    cent7-n1.pepstack.com    192.168.122.223     namenode, datanode
n2 cent7-clone1 cent7-n2.pepstack.com 192.168.122.224 standby, datanode
n3 cent7-clone2 cent7-n3.pepstack.com 192.168.122.225 datanode


1 每台机器上安装saltstack minion

1) 分别给每台机器设置hostname

hostnamectl set-hostname cent7-n1.pepstack.com


2) 给每台机器设置 /etc/hosts

# salt-master
192.168.122.18 repo.pepstack.com

# salt-minion, hacl node
192.168.122.223 cent7-n1.pepstack.com
192.168.122.224 cent7-n2.pepstack.com
192.168.122.225 cent7-n3.pepstack.com


设置 nameserver

vi /etc/sysconfig/network-scripts/ifcfg-eth0


DNS1=192.168.122.1

systemctl restart network



3) 安装 salt-minion

参考: ​​https://www.vultr.com/docs/how-to-install-saltstack-on-centos-7​

yum install wget net-tools
yum update -y && reboot
yum install https://repo.saltstack.com/yum/redhat/salt-repo-2017.7-1.el7.noarch.rpm
yum clean expire-cache
yum install salt-minion


修改文件:

vi /etc/salt/minion


如下:

master: repo.pepstack.com

hash-type: sha256


设置minion_id:

echo "cent7-n1.pepstack.com" > /etc/salt/minion_id


启用服务:

systemctl start salt-minion.service
systemctl enable salt-minion.service