Home  >  Article  >  Database  >  How to start, stop and view redis port

How to start, stop and view redis port

尚
forward
2019-11-28 15:40:085093browse

How to start, stop and view redis port

1. View all redis processes(Recommended: redis introductory tutorial)

ps aux|grep redis

How to start, stop and view redis port 2. Stop redis

kill -9 20024      //根据pid来暴力停止redis进程,这里我只停止了其中一个redis

3. Start redis cluster and sentinel in the background and specify the configuration file

Start redis

[app01@gcdc-wxtest01 ~]$ cd redis/bin/
[app01@gcdc-wxtest01 bin]$ ./redis-server ../conf/redis_7932.conf

Start sentinel sentinel , both methods can be started in the background,

//第一种启动有图形化界面,CTRL+C退出,进程依然存在
[app01@gcdc-wxtest01 bin]$ ./redis-sentinel ../conf/sentinel_27932.conf &

//第二种启动看不到图形化界面,再按一次回车即可
[app01@gcdc-wxtest01 bin]$ nohup ./redis-sentinel ../conf/sentinel_27932.conf&
window 版本
redis-server --service-install redis.windows.conf //开机自启动
redis-server --service-start
redis-server --service-stop

The above is the detailed content of How to start, stop and view redis port. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete