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
相关推荐
习惯就好zz20 分钟前
WSL2 安装Ubuntu卡在安装进度0%无响应问题解决
linux·windows·ubuntu·wsl·wsl2
躲猫猫的喵喵1 小时前
Ubuntu2204降内核版本
linux·运维·服务器·ubuntu
昌sit!2 小时前
Linux系统性基础学习笔记
linux·笔记·学习
zdslovezy2 小时前
CentOS 系统升级 OpenSSH 和 OpenSSL 的完整方案
linux·运维·centos
HIT_Weston3 小时前
18、【Ubuntu】【远程开发】技术方案分析:私网ip掩码
linux·tcp/ip·ubuntu
cccccc语言我来了3 小时前
(Linux (6):从包管理到工具探索,构建系统操作基础认知)
linux·运维·服务器
ben9518chen3 小时前
嵌入式Linux C语言程序设计九
linux·c语言
wuk9984 小时前
CentOS7环境搭建L2TP服务器
运维·服务器
恒创科技HK4 小时前
香港1核2G云服务器当网站服务器够用不?
运维·服务器
颜大哦4 小时前
linux安装mysql
linux·运维·mysql·adb