【问题标题】:Can redis-server executable can be used with .conf file as well as -- cmd line option?redis-server 可执行文件可以与 .conf 文件以及 -- cmd 行选项一起使用吗?
【发布时间】:2020-10-28 10:19:55
【问题描述】:

我需要在启动 redis 时将默认的 .conf 文件传递​​给 redis-server 可执行文件,同时我想在运行 redis-server 可执行文件时覆盖一些配置参数而不接触 .conf 文件

【问题讨论】:

    标签: redis startup redis-server


    【解决方案1】:

    您可以将 configuration 作为参数传递给进程,然后使用 -- 标志 arg 覆盖每个属性。

    例如

    redis-server myredis.conf --requirepass "hello world"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-03-22
      • 2012-11-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-06-15
      • 1970-01-01
      相关资源
      最近更新 更多