zoukankan      html  css  js  c++  java
  • redis启停

    1 查看服务器上启动的redis服务

      开了两个redis单机服务,监听在两个端口。

      开了一个集群,监听在6个端口。

    [root@localhost bin]# ps aux | grep redis | grep -v grep
    root     22033  0.0  0.0  95432  3804 ?        Ssl   2016   6:49 /usr/local/bin/redis3.0.2-server *:7000 [cluster]                    
    root     22053  0.0  0.0  95432  2664 ?        Ssl   2016   6:44 /usr/local/bin/redis3.0.2-server *:7001 [cluster]                    
    root     22057  0.0  0.0  95432  3820 ?        Ssl   2016   6:48 /usr/local/bin/redis3.0.2-server *:7002 [cluster]                    
    root     22061  0.0  0.0  95432  2640 ?        Ssl   2016   6:45 /usr/local/bin/redis3.0.2-server *:7003 [cluster]                    
    root     22065  0.0  0.0  95432  3892 ?        Ssl   2016   6:44 /usr/local/bin/redis3.0.2-server *:7004 [cluster]                    
    root     22069  0.0  0.0  95432  2612 ?        Ssl   2016   6:43 /usr/local/bin/redis3.0.2-server *:7005 [cluster]                    
    root     30263  0.0  0.7 214112 57336 ?        Ssl   2016  48:43 /usr/local/bin/redis-server *:6380                   
    root     30267  0.0  0.0  95328  2232 ?        Ssl   2016   7:26 /usr/local/bin/redis-server *:6381    
    

      

    2 按端口起服务

      redis的服务端为./src/redis-server。启动方式为./src/redis-server /path/to/redis.conf

      在redis.conf里有指定监听端口。

    [root@redis1-20 redis-3.0.6]# ./src/redis-server 6380.conf 
    [root@redis1-20 redis-3.0.6]# ./src/redis-server 6381.conf 
    [root@redis1-20 ~]# ps aux | grep redis
    root       2966  0.1  0.1 131248  1912 ?        Ssl  15:34   0:00 ./src/redis-server *:6380
    root       2995  0.0  0.1 131248  1908 ?        Ssl  15:35   0:00 ./src/redis-server *:6379
    #conf文件里的port参数修改为想要的端口,daemonize要改为yes。然后指定端口启动
    

      

  • 相关阅读:
    面试笔记之手写单例模式
    Java学习笔记六:Java最基础
    Mac下终端工具iTerm2的快捷键
    Typescript引用类型--字符串
    Typescript引用类型--数组
    Typescript函数作用域
    Typescript的函数定义方式
    初识Typescript以及Typescript的安装
    VS Code前端开发常用插件和常用快捷键
    Vue CLI3项目构建
  • 原文地址:https://www.cnblogs.com/jabbok/p/9089125.html
Copyright © 2011-2022 走看看