当前位置:网站首页>Redis batch startup and shutdown script
Redis batch startup and shutdown script
2022-07-03 07:45:00 【Lao Wang's notes】
Redis Multi instance deployment , Often, multiple sets will be deployed in a single machine Redis example , For each Redis It takes time to stop living and start ; Hereby, a batch startup and shutdown script is prepared
#!/bin/bash
info="""
=======================
sh service.sh start
sh service.sh stop
======================
"""
start()
{
for x in `ls /export/data/redis/63*.conf`;do echo $x;/usr/local/bin/redis-server $x;done
echo "redis started"
}
stop()
{
ps -ef | grep redis-server | awk '{print $2}' | xargs kill -9
echo "redis stoped"
}
case $1 in
start)
start
;;
stop)
stop
;;
restart)
stop
sleep 3
start
;;
*)
echo $info
;;
esacThe operation effect is as follows :
边栏推荐
- 图像识别与检测--笔记
- Application of pigeon nest principle in Lucene minshouldmatchsumscorer
- 技术干货|关于AI Architecture未来的一些思考
- PAT甲级 1029 Median
- 华为交换机Console密码重置、设备初始化、默认密码
- 【LeetCode】2. Valid Parentheses·有效的括号
- 华为交换机基础配置(telnet/ssh登录)
- Analysis of the eighth Blue Bridge Cup single chip microcomputer provincial competition
- Analysis of the ninth Blue Bridge Cup single chip microcomputer provincial competition
- s7700设备如何清除console密码
猜你喜欢

Go language foundation ------ 14 ------ gotest

The concept of C language pointer

Partage de l'expérience du projet: mise en œuvre d'un pass optimisé pour la fusion IR de la couche mindstore

技术干货|关于AI Architecture未来的一些思考

Leetcode 198: house raiding

Technology dry goods | Roberta of the migration of mindspore NLP model - emotion analysis task

Collector in ES (percentile / base)

Shengsi mindspire is upgraded again, the ultimate innovation of deep scientific computing

Professor Zhang Yang of the University of Michigan is employed as a visiting professor of Shanghai Jiaotong University, China (picture)

Paper learning -- Study on the similarity of water level time series of Xingzi station in Poyang Lake
随机推荐
【MySQL 12】MySQL 8.0.18 重新初始化
pgAdmin 4 v6.11 发布,PostgreSQL 开源图形化管理工具
Logging log configuration of vertx
Precautions for opensips and TLS SIP trunk docking
Go language foundation ----- 19 ----- context usage principle, interface, derived context (the multiplexing of select can be better understood here)
Technical dry goods | alphafold/ rosettafold open source reproduction (2) - alphafold process analysis and training Construction
Analysis of the problems of the 7th Blue Bridge Cup single chip microcomputer provincial competition
PAT甲级 1032 Sharing
go语言-循环语句
Web router of vertx
OSPF protocol summary
在浏览器输入url后执行什么
Go language foundation ------ 14 ------ gotest
技术干货|昇思MindSpore Lite1.5 特性发布,带来全新端侧AI体验
HDMI2.1与HDMI2.0的区别以及转换PD信号。
When did you find out that youth was over
Paper learning -- Study on the similarity of water level time series of Xingzi station in Poyang Lake
Analysis of the problems of the 10th Blue Bridge Cup single chip microcomputer provincial competition
JUnit unit test of vertx
Technology dry goods | luxe model for the migration of mindspore NLP model -- reading comprehension task