10年 Java程序员,硬核人生!勇往直前,永不退缩!

欢迎围观我的git:https://github.com/R1310328554/spring_security_learn 寻找志同道合的有志于研究技术的朋友,关注本人微信公众号: 觉醒的码农,或Q群 165874185

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

 

在 redis.windows.conf 配置了notify-keyspace-events: 

notify-keyspace-events "AKE"

 

但是 重启redis 之后还是没有反应,  还是不接收不到redis 事件,why?

 

后来发现 配置文件问题, redis-server.exe 启动并不会加载 redis.windows.conf  或其他配置文件,而是默认的配置; 默认的配置在哪里? 估计是在redis-server.exe 程序里写死的。 

 

D:\devTool\redis3.2> redis-server.exe -h
Usage: ./redis-server [/path/to/redis.conf] [options]
       ./redis-server - (read config from stdin)
       ./redis-server -v or --version
       ./redis-server -h or --help
       ./redis-server --test-memory <megabytes>

Examples:
       ./redis-server (run the server with default conf)
       ./redis-server /etc/redis/6379.conf
       ./redis-server --port 7777
       ./redis-server --port 7777 --slaveof 127.0.0.1 8888
       ./redis-server /etc/myredis.conf --loglevel verbose

Sentinel mode:
       ./redis-server /etc/sentinel.conf --sentinel

 

我本以为默认配置文件就是同目录的 , 结果不是。。

 

 

 

是不是仅Windows是这样, 其实linux 也是这样, 看来还是需要指定具体的配置文件地址!

 

posted on 2021-08-20 10:01  CanntBelieve  阅读(808)  评论(0编辑  收藏  举报