1. 程式人生 > >zookeeper自動部署指令碼

zookeeper自動部署指令碼

#!/bin/bash
echo "start zkServer..."
for i in 129 130 131
do
ssh 192.168.100.$i "source /etc/profile;/root/apps/zookeeper-3.4.5/bin/zkServer.sh start"

done

免密開啟

[[email protected] bin]# ssh-keygen

[[email protected] bin]# ssh-copy-id 192.168.100.×

[[email protected] ~]# ssh-copy-id 192.168.100.×