laravel 使用 redis 问题

版权声明:转载请带原文地址!!! https://blog.csdn.net/qq_17403553/article/details/81535768
  1. 首先需要为laravel安装依赖包,通过composer安装,命令:composer require predis/predis 1.0.*

  2. 安装完之后首先需要确保你的服务器已经安装了redis服务,并且已经开启redis服务,否则会报Connection refused [tcp://127.0.0.1:6379],无法连接的错误。

  3. 如果还是没有不可以使用,请检查你服务器的6379端口是否被关闭。

  4. 全都没问题就可以使用了

猜你喜欢

转载自blog.csdn.net/qq_17403553/article/details/81535768