How can I stop redis-server?

前端 未结 26 1852
清歌不尽
清歌不尽 2020-12-07 06:51

I apparently have a redis-server instance running because when I try to start a new server by entering redis-server, I\'m greeted with the followin

26条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-07 07:12

    Option 1: go to redis installation directory and navigate to src , in my case :

    /opt/redis3/src/redis-cli -p 6379 shutdown
    

    where 6379 is the default port.

    Option 2: find redis process and kill

    ps aux | grep redis-server
    
    t6b3fg   22292  0.0  0.0 106360  1588 pts/0    S+   01:19   0:00 /bin/sh /sbin/service redis start
    t6b3fg   22299  0.0  0.0  11340  1200 pts/0    S+   01:19   0:00 /bin/sh /etc/init.d/redis start
    

    And Then initiate kill:

    kill -9 22292
    
    kill -9 22299
    

    I'm using Centos 6.7 , x86_64

    hope it helps

提交回复
热议问题