Home >Database >Redis >How to install Redis in windows environment? Method introduction

How to install Redis in windows environment? Method introduction

青灯夜游
青灯夜游forward
2021-04-20 10:34:372313browse

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.

How to install Redis in windows environment? Method introduction

#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.

How to install Redis in windows environment? Method introduction

Installation steps


#1. Open a cmd window and use the cd command to switch directories to C:\redis and run:

redis-server.exe redis.windows.conf

How to install Redis in windows environment? Method introduction

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

Configure security authentication


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.

How to install Redis in windows environment? Method introduction

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!

Statement:
This article is reproduced at:juejin.cn. If there is any infringement, please contact admin@php.cn delete