Home > Database > Redis > How to install redis

How to install redis

青灯夜游
Release: 2019-06-17 16:11:52
Original
7578 people have browsed it

Sometimes we want to use Redis to cache data and improve program performance. How to download and install Redis? The following article will introduce you to some installation methods of Redis. I hope it will be helpful to you.

How to install redis

1. Download the installation package

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

How to install redis

2. Install Redis

Open the redis folder with the following content:

How to install redis

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

redis-server.exe redis.windows.conf
Copy after login

After input, the following interface will be displayed:

How to install redis

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

Switch to the redis directory and run the following command:

redis-cli.exe -h 127.0.0.1 -p 6379
Copy after login

Set the key-value pair:

set myKey abc
Copy after login

Remove the key-value pair:

get myKey
Copy after login

How to install redis

The installation is complete.

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template