In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article shows you how to set access control permissions in redis, the content is concise and easy to understand, it will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
As a high-speed database, redis must be protected by corresponding security mechanism on the Internet.
1. The safer way is to bind IP to control.
The copy code is as follows:
Bind 127.0.0.1
Indicates that access is only allowed through the ip address 127.0.0.1. So in fact, only you can access yourself, and no other machine can access him.
This order needs to be modified in redis.conf.
Please pay attention here.
Our commonly used startup method, src/redis-server
Change to src/redis-server redis.conf
Because it needs to load the configuration file.
This method is not very good. I inevitably have multiple machines accessing a redis service.
two。 Set the password to provide remote login
Redis.conf
find
Requirepass
Write down
Requirepass yourpassword
After setting the password, I found that I could log in, but the command could not be executed.
The copy code is as follows:
Src/redis-cli-h 192.168.1.121
Keys *
(error) ERR operation not permitted
Authorization command
The copy code is as follows:
Auth 123456
Login with password mode
The copy code is as follows:
. / redis-cli-h 192.168.1.121-an abcd
Due to the strong concurrency ability of redis, only using passwords, attackers may send a large number of requests for guessing passwords in a short period of time, which is easy to crack violently, so it is recommended that the password is as long as possible, such as 20 digits. (the password is in clear text in the conf file, so don't worry about forgetting it.)
The above is how to set access control permissions in redis. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.