使用redis-server &启动redis,没有读取到最新配置

今天搭redis主从架构的时候,使用 redis-server & 启动redis时,一直没有读取到修改后的配置文件,得使用 redis-server /home/redis-7.2.4/redis.conf & 才可以

后面查了下,redis.conf配置中开头有一段注释,说明为了读取配置文件,必须在启动 Redis 时将配置文件路径作为第一个参数传递给 redis-server 命令。

# Redis configuration file example.
#
# Note that in order to read the configuration file, Redis must be
# started with the file path as first argument:
#
# ./redis-server /path/to/redis.conf

 

posted @ 2024-04-07 18:17  心恩惠动  阅读(59)  评论(0编辑  收藏  举报