Homestead中设置redis

服务器 专栏收录该内容
39 篇文章 0 订阅

一、Redis的配置修改

  1. 登入homestead
    vagrant ssh
    
  2. 进入配置文件
    sudo vi /etc/redis/redis.conf
    

二、配置Redis支持主机访问

打开配置文件,显示如下:

#
# IF YOU ARE SURE YOU WANT YOUR INSTANCE TO LISTEN TO ALL THE INTERFACES
# JUST COMMENT THE FOLLOWING LINE.
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bind 127.0.0.1 ::1

# Protected mode is a layer of security protection, in order to avoid 
# ...
# even if no authentication is configured, nor a specific set of interfaces
# are explicitly listed using the "bind" directive.
protected-mode yes

# Accept connections on the specified port, default is 6379 (IANA #815344).
# If port 0 is specified Redis will not listen on a TCP socket.
port 6379

bind 127.0.0.1 ::1行前面增加#注释即可。
修改protected-mode的值为no。关键配置,配置成下面的格式

# bind 127.0.0.1 ::1
protected-mode no
  • 0
    点赞
  • 0
    评论
  • 0
    收藏
  • 一键三连
    一键三连
  • 扫一扫,分享海报

相关推荐
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值