gpt4 book ai didi

redis - Redis中原始和旧conf文件之间的区别

转载 作者:IT王子 更新时间:2023-10-29 06:13:53 27 4
gpt4 key购买 nike

redis 中原始和旧的 conf 文件有什么区别,旧文件在 redis 服务器中的位置是什么。

我在 redis 文档的 config rewrite 命令中读到了相关信息。

网址:- https://redis.io/commands/config-rewrite

最佳答案

Redis 有一个配置文件。但是如果你设置了一些配置,使用 redis-cli> CONFIG SET 命令,那么你需要使用 CONFIG REWRITE 来确保所有这些更改都反射(reflect)在 redis .conf 文件或您手动更新 redis.conf 文件进行相同的更改。如果您不执行任何步骤,下次重新启动 Redis 时,旧配置将被拾取,因为 redis.conf 不会自动更改。

Make sure to also modify the redis.conf file accordingly to the configuration you set using CONFIG SET. You can do it manually, or starting with Redis 2.8, you can just use CONFIG REWRITE, which will automatically scan your redis.conf file and update the fields which don't match the current configuration value. Fields non existing but set to the default value are not added. Comments inside your configuration file are retained.

引用 - https://redis.io/topics/config

另外,默认的文件位置通常是/etc/redis.conf。当您从源代码安装 redis 时,您也会在该 pkg 中获得默认的 redis.conf。

关于redis - Redis中原始和旧conf文件之间的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42095409/

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