In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Install redis on the virtual machine and write a unit test class to access the kv using spring-data-redis on the local machine. It was originally a very simple demo experiment, but it turned out to be a lot of tricks. In the past, we used to connect and test the redis installed by others, or the redis installed by ourselves uses redis-cli to connect, but we have never done the complete construction, but after doing it this time, we still know.
The first pit, the installed redis, after the basic configuration, you need to comment out the bind attribute in the conf file, so that any ip can be accessed. No comment is limited to those ip access. By default, bind 127.0.0.1 only allows local access.
In the second pit, you need to set password access to redis and change the requirepass password in the configuration file; protected-mode is set to yes, or if you do not need to give a password, protected-mode is set to no.
Redis default protected-mode is yes
The third pit, you need to turn off the firewall of Windows, just turn it off in the control panel.
The fourth pit, you need to turn off the firewall of linux. I use centos7. The command to turn off the firewall is as follows: directly close the firewall, systemctl stop firewalld.service; forbids the firewall to start systemctl disable firewalld.service.
After completing the above four pits, the redis on the virtual machine can finally be accessed.
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.