Home  >  Article  >  Database  >  How to install Redis

How to install Redis

藏色散人
藏色散人Original
2019-08-19 13:34:285621browse

How to install Redis

How to install Redis?

Install under Window

Download address: https://github.com/MSOpenTech/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

Open the folder;

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

redis-server.exe redis.windows.conf

If you want If it is convenient, you can add the redis path to the system environment variable, so that you don't have to enter the path again. The following redis.windows.conf can be omitted. If omitted, the default one will be enabled. After inputting, the following interface will be displayed:

How to install Redis

At this time, open another cmd window. Do not close the original one, otherwise you will not be able to access the server.

Switch to the redis directory and run:

redis-cli.exe -h 127.0.0.1 -p 6379

Set the key-value pair:

set myKey abc

Remove the key-value pair:

get myKey

How to install Redis

For more Redis related knowledge, please visit the Redis usage tutorial column!

The above is the detailed content of How to install Redis. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn