zoukankan      html  css  js  c++  java
  • linux 下查看redis是否启动和启动命令

    查看redis是否启动使用的是 ps aux | grep redis-server 命令

    ps aux | grep redis-server

    可以在根目录下使用,也可以在其他目录下使用

    [red@RedFace sbin]$ cd /
    [red@RedFace /]$ ps aux | grep redis-server
    red       6218  0.0  0.0   4420   760 pts/1    S+   04:50   0:00 grep redis-server
    [red@RedFace /]$ 
    [red@RedFace /]$ cd -
    /usr/local/nginx/sbin
    [red@RedFace sbin]$ ps aux | grep redis-server
    red       6223  0.0  0.0   4420   760 pts/1    S+   04:51   0:00 grep redis-server
    [red@RedFace sbin]$ 

    运行redis

    ps aux | grep redis-server
    
      [root@localhost redis]# cd bin/
      [root@localhost bin]# ls
      dump.rdb redis-benchmark redis-check-aof redis-check-rdb redis-cli redis.conf redis-sentinel redis-server
    [root@localhost bin]# ps aux | grep redis-server
    root       9281  0.0  0.0 112724   992 pts/0    R+   22:43   0:00 grep --color=auto redis-server
    [root@localhost bin]# ./redis-server 
    9307:C 21 Aug 2020 22:44:42.519 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
    9307:C 21 Aug 2020 22:44:42.519 # Redis version=5.0.3, bits=64, commit=00000000, modified=0, pid=9307, just started
    9307:C 21 Aug 2020 22:44:42.519 # Warning: no config file specified, using the default config. In order to specify a config file use ./redis-server /path/to/redis.conf
    9307:M 21 Aug 2020 22:44:42.520 * Increased maximum number of open files to 10032 (it was originally set to 1024).
                    _._                                                  
               _.-``__ ''-._                                             
          _.-``    `.  `_.  ''-._           Redis 5.0.3 (00000000/0) 64 bit
      .-`` .-```.  ```/    _.,_ ''-._                                   
     (    '      ,       .-`  | `,    )     Running in standalone mode
     |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
     |    `-._   `._    /     _.-'    |     PID: 9307
      `-._    `-._  `-./  _.-'    _.-'                                   
     |`-._`-._    `-.__.-'    _.-'_.-'|                                  
     |    `-._`-._        _.-'_.-'    |           http://redis.io        
      `-._    `-._`-.__.-'_.-'    _.-'                                   
     |`-._`-._    `-.__.-'    _.-'_.-'|                                  
     |    `-._`-._        _.-'_.-'    |                                  
      `-._    `-._`-.__.-'_.-'    _.-'                                   
          `-._    `-.__.-'    _.-'                                       
              `-._        _.-'                                           
                  `-.__.-'                                               
  • 相关阅读:
    CodeForces 150E: Freezing with Style
    CodeForces 407E: k-d-sequence
    CodeForces 809E: Surprise me!
    CodeForces 1178G: The Awesomest Vertex
    LOJ 3158: 「NOI2019」序列
    LOJ 3160: 「NOI2019」斗主地
    LOJ 3159: 「NOI2019」弹跳
    LOJ 3156: 「NOI2019」回家路线
    【比赛游记】NOI2019打铁记
    LOJ 2085: 洛谷 P1587: bzoj 4652: 「NOI2016」循环之美
  • 原文地址:https://www.cnblogs.com/ooo888ooo/p/13538350.html
Copyright © 2011-2022 走看看