zoukankan      html  css  js  c++  java
  • redis集群启动和关闭脚本

    创建startall.sh

    /usr/local/redis/bin/redis-server /usr/local/redis/redis-cluster/7001/redis.conf
    /usr/local/redis/bin/redis-server /usr/local/redis/redis-cluster/7002/redis.conf
    /usr/local/redis/bin/redis-server /usr/local/redis/redis-cluster/7003/redis.conf
    /usr/local/redis/bin/redis-server /usr/local/redis/redis-cluster/7004/redis.conf
    /usr/local/redis/bin/redis-server /usr/local/redis/redis-cluster/7005/redis.conf
    /usr/local/redis/bin/redis-server /usr/local/redis/redis-cluster/7006/redis.conf

    创建stopall.sh

    /usr/local/redis/bin/redis-cli -c -p 7001 shutdown
    /usr/local/redis/bin/redis-cli -c -p 7002 shutdown
    /usr/local/redis/bin/redis-cli -c -p 7003 shutdown
    /usr/local/redis/bin/redis-cli -c -p 7004 shutdown
    /usr/local/redis/bin/redis-cli -c -p 7005 shutdown
    /usr/local/redis/bin/redis-cli -c -p 7006 shutdown

    提示:作为脚本启动,要给脚本指定的权限

  • 相关阅读:
    扯一扯纯函数
    10.28
    10.27 动手动脑5
    10.26
    10.25 周总结
    10.23
    10.22
    10.21 动手动脑4
    10.20
    10.19
  • 原文地址:https://www.cnblogs.com/116970u/p/11268816.html
Copyright © 2011-2022 走看看