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

How to modify redis ip address

Release: 2020-04-28 09:14:23
forward
10719 people have browsed it

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/
Copy after login

The second step : Edit the redis.conf configuration file in this directory

vim redis.conf
Copy after login

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
Copy after login

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!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template