Home  >  Article  >  Database  >  How to modify redis ip address

How to modify redis ip address

尚
forward
2020-04-28 09:14:2310690browse

How to modify redis ip address

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:

How to modify redis ip address

and then find this content , and comment it out with # in front.

How to modify redis ip address

That is the picture below

How to modify redis ip address

Step 4:
Find the content of the picture below and protect it Change -mode yes to no

How to modify redis ip address

How to modify redis ip address

# 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!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete