Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

To open a remote connection to a redis server

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Today, what the editor shares with you is the steps for redis to open a remote connection, which many people don't know much about. Today, in order to give you a better understanding of how redis opens a remote connection, I have summarized the following contents for you. Let's move on. I'm sure you'll get something.

Redis only supports local use by default. How to open a remote connection and access a remote redis server remotely?

General steps to open a remote connection:

1. Mask local binding information

2. Add requirepass

3. Restart redis

4. Add redis ports to firewall rules

Next, let's look at the detailed process.

Comment redis binding

Modify redis configuration file

Vi / usr/local/redis/etc/redis.conf

Search bind 127.0.0.1 and comment out all

Set up requirepass

The requirepass field is actually the auth password of the redis connection

The settings are shown in the figure

Restart reids

Service redis-server restart

Add firewall rules

Iptables-I INPUT-p tcp-m state-state NEW-m tcp-dport 6379MJ ACCEPT

From here, you can connect to redis remotely.

The above is a brief introduction of the steps for redis server to open a remote connection. Of course, the differences in the detailed use of the above have to be understood by everyone. If you want to know more, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report