本地访问虚拟机redis

1.开放端口号6379

iptables –I INPUT –p tcp –-dport 6379 –j ACCEPT

2.修改redis.conf 配置文件

 ①修改redis绑定IP为虚拟机IP地址

 ②关闭保护模式protected-mode

修改完配置文件不要忘记让配置文件生效 source redis.conf

猜你喜欢

转载自www.cnblogs.com/suni/p/9885454.html