gpt4 book ai didi

redis - 如何成功启动 `redis-sentinel`服务器

转载 作者:可可西里 更新时间:2023-11-01 11:12:28 25 4
gpt4 key购买 nike

抱歉这里是 redis 新手。

当我运行 redis-sentinel

42533:X 10 Nov 21:21:30.345 # Warning: no config file specified, using 
the default config. In order to specify a config file use redis-
sentinel /path/to/sentinel.conf
42533:X 10 Nov 21:21:30.346 * Increased maximum number of open files to
10032 (it was originally set to 7168).
Redis 3.0.4 (00000000/0) 64 bit

Running in sentinel mode
Port: 26379
PID: 42533
http://redis.io

42533:X 10 Nov 21:21:30.347 # Sentinel runid is
733213860cf470431c7441e5d6aaf9ed9b2d7c2f
42533:X 10 Nov 21:21:30.347 # Sentinel started without a config file.
Exiting...

我错过了什么?我需要一个配置文件吗?如果是这样,我的 /path/to/sentinel.conf 应该在哪里?

最佳答案

运行 Sentinel 时必须使用配置文件,因为系统将使用此文件来保存当前状态,以便在重启时重新加载。如果没有给出配置文件或者配置文件路径不可写,Sentinel 将简单地拒绝启动。

您可以使用以下命令行运行 Sentinel:

redis-sentinel /path/to/sentinel.conf

否则,您可以直接使用以哨兵模式启动它的 redis-server 可执行文件:

redis-server /path/to/sentinel.conf --sentinel

您可以将文件放在任何您想要的地方,只要确保您提供正确的路径即可。例如,如果你在 linux 中并且文件在你的主目录中,那么命令将为

redis-sentinel ~/sentinel.conf

关于redis - 如何成功启动 `redis-sentinel`服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53245394/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com