zoukankan      html  css  js  c++  java
  • Redis连接时报错:Could not connect to Redis at 127.0.0.1:6379: Connection refused

    Could not connect to Redis at 127.0.0.1:6379: Connection refused

    [root@rongle bin]# redis-cli
    Could not connect to Redis at 127.0.0.1:6379: Connection refused
    [root@rongle /]# redis-server /etc/redis.conf
    [root@rongle /]# redis-cli
    redis 127.0.0.1:6379>

    在安装好redis扩展 尝试连接redis时,客户端打不开,原因是需要先开启服务端,这需要先配置——

    1.找到redis.conf 并修改 daemonize no 为 daemonize yes ,这样就可以默认启动就后台运行

    2.开启客户端要确保服务端启动

    [root@rongle /]# redis-server /etc/redis.conf

    3.启动客户端不成功要退出再进行下一步

    现在就可以正常访问了

    [root@rongle /]# redis-server /etc/redis.conf
    [root@rongle /]# redis-cli
    redis 127.0.0.1:6379>
  • 相关阅读:
    iOS_03_为什么选择ios开发
    iOS_02_什么是ios开发
    iOS_01_什么是ios
    Hadoop之HDFS
    hadoop组件及其作用
    数组
    Scala基础知识(二)
    hadoop安装过程
    Scala基础知识
    建造者模式
  • 原文地址:https://www.cnblogs.com/niuben/p/11307406.html
Copyright © 2011-2022 走看看