Start cluster zookeeper in shell script
2015-07-26 10:08
453 查看
cat start-zookeeper.sh
#!bin/sh
for node in namenode01 datanode01 datanode02
do
echo "start zookeeper at $node"
ssh $node "source .bash_profile;zkServer.sh start"
done
pay attention to the .bash_profile;
you should set zookeeper home variable and java_home variable
or else the start will fail.
#!bin/sh
for node in namenode01 datanode01 datanode02
do
echo "start zookeeper at $node"
ssh $node "source .bash_profile;zkServer.sh start"
done
pay attention to the .bash_profile;
you should set zookeeper home variable and java_home variable
or else the start will fail.
相关文章推荐
- linux C中调用shell命令和运行shell脚本
- Linux Shell篇之一:Shell编程简介
- 八大排序算法-shell 排序
- Xshell 4 SSH隧道跳转访问局域网服务器
- 未能加载文件或程序集“Microsoft.VisualStudio.Shell, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f1
- shell 学习基地
- Linux常用的系统监控shell脚本
- Linux常用的系统监控shell脚本
- linux系统巡检脚本shell实例
- linux系统巡检脚本shell实例
- linux shell编程总结
- linux shell编程总结
- ash, bash, ksh, csh, zsh
- ash, bash, ksh, csh, zsh
- Unix Shells: Bash, Fish, Ksh, Tcsh, Zsh
- Unix Shells: Bash, Fish, Ksh, Tcsh, Zsh
- 二道shell面试题
- 二道shell面试题
- Zsh 替换原有 Bash
- shell脚本:shell的基本元素-5 基本的I/O重定向