This article will introduce to you how to install Redis in a windows environment. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.
#Redis is an open source (BSD licensed) in-memory data structure store used as a database, cache, and message broker. Redis provides data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperlogs, geospatial indexes, and streams. Redis has built-in replication, Lua scripts, LRU eviction, transactions and different levels of disk durability, and provides high availability through automatic partitioning of Redis Sentinel and Redis Cluster. [Related recommendations: Redis Video Tutorial]
Download address: https://github.com/tporadowski/redis/releases.
Redis supports 32-bit and 64-bit. This needs to be selected according to the actual situation of your system platform. Here we download the Redis-x64-xxx.zip compressed package to the C drive. After decompression, rename the folder to redis.
#1. Open a cmd window and use the cd command to switch directories to C:\redis and run:
redis-server.exe redis.windows.conf
2. At this time, open another cmd window. Do not close the original one, otherwise you will not be able to access the server.
3. Switch to the redis directory and run:
redis-cli.exe -h 127.0.0.1 -p 6379 set myKey abc get myKey
Find the redis configuration file—redis.conf file , and then modify the requirepass inside. This was originally commented. Remove the comment, set the corresponding field to the password you want, save and exit. Just restart the redis service.
For more programming-related knowledge, please visit: Programming Teaching! !
The above is the detailed content of How to install Redis in windows environment? Method introduction. For more information, please follow other related articles on the PHP Chinese website!