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        
  `-._    `-._`-.__.-'_.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |                                  
  `-._    `-._`-.__.-'_.-'    _.-'                                   
      `-._    `-.__.-'    _.-'                                       
          `-._        _.-'                                           
              `-.__.-'                                               

 

posted @ 2020-08-20 22:44  牧牛人Alec  阅读(8750)  评论(0编辑  收藏  举报