Start redis configuration - the external network access, network access restriction off

Disclaimer: This article is a blogger original article, follow the CC 4.0 by-sa copyright agreement, reproduced, please attach the original source link and this statement.
This link: https: //blog.csdn.net/qq_27631797/article/details/79062574

 

Provided that you have put into port redis firewall program,

/sbin/iptables -I INPUT -p tcp --dport 6379 -j ACCEPT

/etc/rc.d/init.d/iptables save

changes redis.conf file

bind 127.0.0.1

protected-mode yes

Change

# bind 127.0.0.1

protected-mode no

then restart redis,
provided that you are now running redis
closed redis

Redis-cli the shutdown #

redis-cli is your installation path, that is, make install, you specify a path,
restart redis

Server-/opt/local/redis/redis-4.0.6/redis.conf Redis

Redis-Server is also installed in the path
so that access is provided outside the network is successful.

Guess you like

Origin www.cnblogs.com/lxj666/p/11358338.html