Many times the IP address of our redis is generally the default 127.0.0.1, which means that it can only accept access from this machine, so when we want to access this redis from other machines, You need to modify the IP address access.
The first step: Enter our redis configuration file, for example, I am in /opt/myRedis/redis.conf, use the command to jump to the corresponding path
cd /opt/myRedis/
The second step : Edit the redis.conf configuration file in this directory
vim redis.conf
Step 3: After entering the configuration file, in view mode (that is, when it is read-only, jump to the last line, as if pressing A G can jump quickly) Press / to search in the text, enter
/bind
at the end of the text, as shown below:
and then find this content , and comment it out with # in front.
That is the picture below
Step 4:
Find the content of the picture below and protect it Change -mode yes to no
# as shown below and then restart the redis service.
For more redis knowledge, please pay attention to the redis introductory tutorial column.
The above is the detailed content of How to modify redis ip address. For more information, please follow other related articles on the PHP Chinese website!