当前位置:网站首页>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 moyufedUse 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
边栏推荐
- MySQL queries data by day, week, month, quarter and year
- Jupiter notebook common shortcut keys
- Flex & Bison 開始
- OpenJudge NOI 2.1 15:Counterfeit Dollar
- #24class静态成员
- pdm导入vscode的实现方式
- OBS-Studio-27.2.4-Full-Installer-x64.exe 下载
- 电路模块分析练习5(电源)
- Repoptimizer: it's actually repvgg2
- Unity technical manual - getKey and getaxis and getbutton
猜你喜欢

Network security project questions of the first Henan vocational skills competition in 2022

多模态数据也能进行MAE?伯克利&谷歌提出M3AE,在图像和文本数据上进行MAE!最优掩蔽率可达75%,显著高于BERT的15%...

String deformation (string case switching and realization)

Baidu: in 2022, the top ten hot spots will rise and the profession will be released. There is no suspense about the first place!

【AXI】解读AXI协议原子化访问

After xampp restarts, the MySQL service cannot be started.

STM32开发板+机智云AIoT+家庭监测控制系统

Oracle -- table operation

Fastjson deserialization randomness failed

UE4_UE5结合offline voice recognition插件做语音识别功能
随机推荐
元宇宙标准论坛成立
[2023 proofreading and bidding questions] Part 1: Measurement Technology FPGA post (roughly analytical version)
UE4_ Ue5 combines the offline voice recognition plug-in for speech recognition
百度:2022年十大热度攀升专业出炉,第一名无悬念!
【AXI】解读AXI协议原子化访问
ES6 - numerical extension and object extension
Huawei cloud SRE deterministic operation and maintenance special issue (the first issue)
Fastjson反序列化随机性失败
[opencv450 samples] create image list yaml
统计字符串中不同回文子序列的个数
OpenJudge NOI 2.1 15:Counterfeit Dollar
Meta universe standard forum established
ES6 learning -- let
头歌 第3关:使用线程锁(Lock)实现线程同步
漏刻有时API接口实战开发系列(13):小鹅通云服务PHP-API二维数组传参解决方案
Unity technical manual - particle emission and life cycle velocity sub module
Idea FAQ collection
After xampp restarts, the MySQL service cannot be started.
Idea auto generator generates constructor get/set methods, etc
Live800 online customer service system: do business across time and space, starting from each interaction