Home > Database > Redis > Detailed explanation of the method of redis configuring remote connection

Detailed explanation of the method of redis configuring remote connection

Release: 2019-11-29 16:22:52
forward
4336 people have browsed it

Detailed explanation of the method of redis configuring remote connection

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

Detailed explanation of the method of redis configuring remote connection

##Set requirepass

requirepass field is actually the auth password of the redis connection

The setting is as shown in the figure

Detailed explanation of the method of redis configuring remote connection

Restart reids (recommended: redis video Tutorial)

service redis-server restart

Detailed explanation of the method of redis configuring remote connection

Add firewall rules

iptables -I INPUT -p tcp -m state –state NEW -m tcp –dport 6379-j ACCEPT

Here you can connect to redis remotely

Detailed explanation of the method of redis configuring remote connection

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

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