The method that the redis server allows remote hosts to access


If the remote host needs to access the redis server, you can modify the redis.conf configuration file

The bind field defaults to: bind 127.0.0.1 so that redis can only be accessed natively

To allow remote host access, comment out the bind line or change bind 127.0.0.1 to: bind 0.0.0.0

Verify access to the redis server on the remote host:

./redis-cli -h REDIS_HOST_IP_ADDR -p 6379

REDIS_HOST_IP_ADDR : 6379> ping
PONG

Successful access to the redis server!