zoukankan      html  css  js  c++  java
  • centos7 supervisor管理redis

    centos7 supervisor管理redis

    标签(空格分隔): linux,redis

    概念

    Supervisor 相当强大,提供了很丰富的功能,不过我们可能只需要用到其中一小部分
    supervisor:名称
    supervisord:服务端
    supervisorctl:客户端
    

    安装supervisor

    推荐yum安装[需要安装python环境]
    sudo  root
    yum install epel-release
    yum install -y supervisor
    # 开机自启动
    systemctl enable supervisord
    systemctl is-enabled supervisord
    # 启动supervisord服务
    systemctl start supervisord 
    # 查看supervisord服务状态
    systemctl status supervisord 
    # 查看是否存在supervisord进程
    ps -ef|grep supervisord 
    # 
    supervisorctl restart <application name> ;重启指定应用
    supervisorctl stop <application name> ;停止指定应用
    supervisorctl start <application name> ;启动指定应用
    supervisorctl restart all ;重启所有应用
    supervisorctl stop all ;停止所有应用
    supervisorctl start all ;启动所有应用
    

    supervisor替换redis自带的守护

    1. 在/etc/supervisord.d/创建进程管理配置文件
      vim redis.ini
      [program:redis]
      command=/usr/local/bin/redis-server /etc/redis.conf
      autostart=true
      autorestart=true
      startsecs=3
      daemonize=no
      stdout_logfile=/etc/supervisord.d/logs/redis.log

      关闭配置文件守护进程

    2. 更新supervisor配置
      supervisorctl update

    3. 测试kill所有
      killall -9 redis-server
      查看日志文件

  • 相关阅读:
    Buffer Lock Mode and Compatibilities
    11g默认审计选项
    11.2.0.2 asmcmd lsdg show incorrect diskgroup number
    关于V$OPEN_CURSOR
    了解你所不知道的SMON功能(七):清理IND$字典基表
    PL/SQL DEPENDENCIES
    温习 Linux 命令
    温习 SQL 03
    PL/SQL 基础 ( 下 )
    HTML501 ( The.Essential.Guide )
  • 原文地址:https://www.cnblogs.com/yanweifeng/p/11573553.html
Copyright © 2011-2022 走看看