starrocks启动和停止和重启脚本

StarRocks启动和停止和重启脚本

编辑脚本:vim start_stop_starrocks.sh

备注:IP修改为自己的IP即可

复制代码
#!/bin/bash

case $1 in
"start"){
        for i in 12.3.7.147 12.3.7.148 12.3.7.149 12.3.7.150
        do
                echo " --------启动 $i be -------"
                ssh $i "/home/hadoop/StarRocks-2.4.1/be/bin/start_be.sh --daemon"
        done
};;
"stop"){
        for i in 12.3.7.147 12.3.7.148 12.3.7.149 12.3.7.150
        do
                echo " --------停止 $i be -------"
                ssh $i "/home/hadoop/StarRocks-2.4.1/be/bin/stop_be.sh --daemon"
        done
};;
"restart"){
        for i in 12.3.7.147 12.3.7.148 12.3.7.149 12.3.7.150
        do
                echo " --------停止 $i be -------"
                ssh $i "/home/hadoop/StarRocks-2.4.1/be/bin/stop_be.sh --daemon"
        done
        sleep 5
                for i in 12.3.7.147 12.3.7.148 12.3.7.149 12.3.7.150
        do
                echo " --------启动 $i be -------"
                ssh $i "/home/hadoop/StarRocks-2.4.1/be/bin/start_be.sh --daemon"
        done
};;
esac

执行命令

启动集群
复制代码
sh start_stop_starrocks.sh start
停止集群
复制代码
sh start_stop_starrocks.sh stop
重启集群
复制代码
sh start_stop_starrocks.sh restart
相关推荐
Maple_land几秒前
Linux进程第八讲——进程状态全景解析(二):从阻塞到消亡的完整生命周期
linux·运维·服务器·c++·centos
嵌入式分享2 分钟前
嵌入式分享#41:RK3576改UART波特率【精简版】
linux·嵌入式硬件·ubuntu·嵌入式
爱吃生蚝的于勒4 分钟前
【Linux】零基础学会Linux之权限
linux·运维·服务器·数据结构·git·算法·github
量子物理学6 分钟前
Eclipse Mosquitto 在小内存下怎么修改配置文件
java·服务器·eclipse
惜.己12 分钟前
linux中jenkins正常启动外部无法访问
linux·servlet·jenkins
Cyan_RA924 分钟前
Linux 远程Ubuntu服务器本地部署大模型 EmoLLM 中常见的问题及解决方案 万字详解
linux·运维·服务器·ubuntu·大模型·远程部署·emollm
数字冰雹25 分钟前
图观 流渲染打包服务器
服务器·前端·github·数据可视化
minji...36 分钟前
Linux相关工具vim/gcc/g++/gdb/cgdb的使用详解
linux·运维·服务器·c++·git·自动化·vim
web安全工具库40 分钟前
Linux 高手进阶:Vim 核心模式与分屏操作详解
linux·运维·服务器·前端·数据库
egoist20231 小时前
[linux仓库]信号产生[进程信号·贰]
linux·键盘·系统调用·信号产生·软件条件