Redis only supports local use by default. How to enable remote connection and remotely access the remote redis server (recommended: redis introductory tutorial)
General steps for opening a remote connection
1. Shield local binding information
2. Add requirepass
3. Restart redis
4. Change the redis port Add firewall rules
Next look at the detailed process
Comment redis binding
Modify redis configuration file
vi /usr/ local/redis/etc/redis.conf
Search for bind 127.0.0.1 and comment out all
##Set requirepass
requirepass field is actually the auth password of the redis connection The setting is as shown in the figure
Restart reids (recommended: redis video Tutorial)
service redis-server restartAdd firewall rules
iptables -I INPUT -p tcp -m state –state NEW -m tcp –dport 6379-j ACCEPTHere you can connect to redis remotelyThe above is the detailed content of Detailed explanation of the method of redis configuring remote connection. For more information, please follow other related articles on the PHP Chinese website!