当前位置:网站首页>Windows redis installation and simple use
Windows redis installation and simple use
2022-06-25 23:29:00 【Justion_】
Demand background
Currently using Alibaba Egg.js Develop background applications , Considering that some highly concurrent interfaces often call database queries , So add Redis As a server-side cache .
Solution
1、 install Redis, Because the system is Windows7, Therefore, you need to download the corresponding Windows Version of , Download address :https://github.com/MicrosoftArchive/redis/releases
2、 Simple configuration Redis start-up , by Redis Add password to your connection , To ensure safety
Core code
install Redis
Visit the above 【 Download address 】, Select the version you want , an Assets Catalog , You can choose .msi File or .zip File download . If you download .msi file , You can perform the installation directly ( Check the corresponding check box ), If you download .zip file , You can refer to the link 【Window To configure Redis Environment and simple use 】 https://www.cnblogs.com/wxjnew/p/9160855.html To install and configure .
Check Windows service
With Windows7 For example , Can enter the Control panel \ All control panel items \ Management tools find 【 service 】, After the light , Find... In the service list Redis.
Redis Startup and shutdown
Once installed , We can start and shut down through services Redis 了 , We can view the task manager of the system , Check if... Is started redis-server, Here is redis-server Startup and shutdown commands :
$ redis-server.exe --service-start # start-up
$ redis-server.exe --service-stop # close
Use cli
confirm redis-server After starting , We can execute redis In the catalog redis-cli.exe file , So you can connect to Redis 了 . Of course , We can also use the command line CMD To link Redis.
It can be done directly Redis Accessed :
$ redis-cli.exe -h 127.0.0.1 -p 6379
127.0.0.1:6379> set firstKey "moyufed"
OK
127.0.0.1:6379> get firstKey
"moyufed"
127.0.0.1:6379>
Add password
stay Redis In the installation directory of , Yes redis.windows.conf ,redis.windows-service.conf Two documents , We use Notepad to open ( recommend Notepad++), Find the line that needs to set the password , Sure Ctrl + F lookup “requirepass” The line of ( Probably 386 Row position ), Set separately Redis password ( Get rid of the front “#”), Example :
requirepass moyufed
Use Redis
Restart after modification redis-server , Now connect Redis after Redis Access requires login , Example :
[email protected] C:\Users\Administrator
$ redis-server.exe --service-stop
[42636] 25 Feb 18:42:53.622 # Redis service successfully stopped.
[email protected] C:\Users\Administrator
$ redis-server.exe --service-start
[38828] 25 Feb 18:42:58.576 # Redis service successfully started.
[email protected] C:\Users\Administrator
$ redis-cli.exe -h 127.0.0.1 -p 6379
127.0.0.1:6379> set firstKey "moyufed"
(error) NOAUTH Authentication required.
127.0.0.1:6379> auth moyufed
OK
127.0.0.1:6379> set firstKey "moyufed"
OK
127.0.0.1:6379> get firstKey
"moyufed"
127.0.0.1:6379>
Reference documents
Window To configure Redis Environment and simple use :https://www.cnblogs.com/wxjnew/p/9160855.html
Windows Next Redis Installation, configuration and use precautions :https://www.cnblogs.com/LMJBlogs/p/11550170.html
边栏推荐
- How to solve the problem of SQL?
- 2、一个向量乘它的转置,其几何意义是什么?
- 【AXI】解读AXI协议乱序机制
- Idea shortcut
- Kubernetes cluster construction of multiple ECS
- Use and difference between ue4\ue5 blueprint node delay and retroggable delay
- Some points to pay attention to when closing mongodb services (as well as related commands when opening)
- 剑指 Offer 46. 把数字翻译成字符串(DP)
- [modulebuilder] GP service realizes the intersection selection of two layers in SDE
- UE4_UE5结合offline voice recognition插件做语音识别功能
猜你喜欢
The Ping class of unity uses
Live800在线客服系统:跨越时空做生意,从每次互动开始
【opencv450-samples】inpaint 使用区域邻域恢复图像中的选定区域
Multi modal data can also be Mae? Berkeley & Google proposed m3ae to conduct Mae on image and text data! The optimal masking rate can reach 75%, significantly higher than 15% of Bert
多台云服务器的 Kubernetes 集群搭建
ES6 const constants and array deconstruction
百度:2022年十大热度攀升专业出炉,第一名无悬念!
Why is the frame rate calculated by opencv wrong?
#24class静态成员
小程序绘制一个简单的饼图
随机推荐
Svn icon disappearing solution
The wisdom of questioning? How to ask questions?
How to add cartoon characters to the blog park?
Fegin client entry test
Leetcode(605)——种花问题
电路模块分析练习5(电源)
konva系列教程2:绘制图形
[opencv450 samples] create image list yaml
Somme logarithmique (deux points) pour le Groupe 52 - - e de la course de la lune blanche de niuke
Use and difference between ue4\ue5 blueprint node delay and retroggable delay
No absurd tea applet - rule change
Why is BeanUtils not recommended?
牛客小白月赛52--E 分组求对数和(二分)
NLP text summary: use the pre training model to perform text summary tasks [transformers:pipeline, T5, Bart, Pegasus]
String deformation (string case switching and realization)
1281_ FreeRTOS_ Implementation analysis of vtaskdelayuntil
Beacon realizes asset management and indoor positioning based on 5.2 ultra-low power Bluetooth module efr32 (bg22ax)
. SQL database import error: / *! 40101 SET @OLD_ COLLATION_ [email protected]@COLLATION_ CONNECTION */
Ue4 Ue5 combine le plug - in de reconnaissance vocale de bureau pour la reconnaissance vocale
[opencv450 samples] read the image path list and maintain the proportional display