redis 修改配置文件不起作用?

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

notify-keyspace-events "AKE"

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

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

D:devTool
edis3.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 也是这样, 看来还是需要指定具体的配置文件地址!


版权声明
本文原创发表于 博客园,作者为 阿K .     本文欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则视为侵权。
欢迎关注本人微信公众号:觉醒的码农,或者扫码进群:

原文地址:https://www.cnblogs.com/FlyAway2013/p/15165135.html