CentOS 7安装Redis遇到的问题

  1. Warning: redisd.service changed on disk. Run 'systemctl daemon-reload' to reload units.
    [root@centos7 ~]# systemctl daemon-reload      执行这句之后就OK了
  2. redis服务端程序无法关闭。
    [root@centos7 redis]# service redisd stop  
    Stopping ...  
    (error) NOAUTH Authentication required.  
    Waiting for Redis to shutdown ...
    Waiting for Redis to shutdown ...
    Waiting for Redis to shutdown ...
    这里可能是在redis配置文件中开启了"requirepass",这里可以关闭这项,也可以修改redis启动脚本,按下图。
  3. redis客户端无法操作。
    [root@centos7 redis]# redis  
    127.0.0.1:6379> set name Lewis  
    (error) NOAUTH Authentication required.  
     
    127.0.0.1:6379> auth foobared       foobared是你在配置文件设置的密码
    OK  
    127.0.0.1:6379> set name Lewis  
    OK  
    127.0.0.1:6379> get name  
    "Lewis"

如果安装redis遇到问题,可以看着这篇CentOS7安装Redis 4.0


猜你喜欢

转载自blog.csdn.net/qq_34272964/article/details/79763442