【问题标题】:Redis running on 6379 even the conf file changed to 7000Redis 在 6379 上运行,即使 conf 文件更改为 7000
【发布时间】:2014-03-25 09:57:48
【问题描述】:

我正在通过以下步骤在 Linux Centos 中安装 redis:

mkdir /redis/
cd /redis
wget http://redis.googlecode.com/files/redis-2.6.14.tar.gz
extracted it using tar -xzf redis-2.6.14.tar.gz
make && make install PREFIX=/redis/
Changed the port in redis.conf(/redis/redis.conf) to 7000
Changed the port redis_init_script(/redis/utils/redis_init_script) to 7000
Then issued the command /redis/bin/redis-server

现在当我发出命令时,我看到了这个,

上面写着6379

:(

【问题讨论】:

  • 运行 netstat -anp | grep 6379netstat -anp | grep 7000。这两个命令中的任何一个都会显示 redis 实际监听的端口。
  • 那么这意味着您在错误的地方更改了redis端口。或者可能是您在更改端口后没有重新加载/重新启动守护进程。
  • 运行 /redis/bin/redis-cli info server | grep conf 并仔细检查 config_file 值以确保 Redis 使用您编辑的配置文件。

标签: linux amazon-web-services redis


【解决方案1】:

您还没有告诉它要使用哪个配置文件,所以您正在使用所有默认值启动服务器。试试吧:

/redis/bin/redis-server /redis/redis.conf

【讨论】:

    猜你喜欢
    • 2013-10-14
    • 2021-08-25
    • 2021-01-21
    • 1970-01-01
    • 2021-02-07
    • 1970-01-01
    • 1970-01-01
    • 2018-08-31
    • 2022-11-25
    相关资源
    最近更新 更多