English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Download address:https://github.com/tporadowski/redis/releases.
Redis supports 32 and 64 This needs to be selected according to the actual situation of your system platform. Here we download Redis-x64-xxx.zipCompress the package to C drive, unzip it, and rename the folder to redis.
Open the folder, the content is as follows:
Open a cmd Window Use the cd command to switch to the directory C:\redis Run:
redis-server.exe redis.windows.conf
If you want it to be convenient, you can add the redis path to the system environment variables, so you don't have to input the path again. The redis.windows.conf at the end can be omitted. If omitted, the default will be enabled. After entering, the following interface will be displayed:
At this time, open another cmd window, do not close the original one, otherwise you will not be able to access the server.
Run under the redis directory:
redis-cli.exe -h 127.0.0.1 -p 6379
Set the key-value pair:
set myKey abc
Retrieve the key-value pair:
get myKey
Download address:http://redis.io/downloadDownload the latest stable version.
The latest document version used in this tutorial is 2.8.17Download and install:
# wget http://download.redis.io/releases/redis-6.0.8.tar.gz # tar xzf redis-6.0.8.tar.gz # cd redis-6.0.8 # make
After executing the make command, redis-6.0.8 will appear in the compiled redis service program redis-server, and the test client program redis-cli:
Below is the start of redis service:
# cd src # ./redis-server
Note that this way of starting redis uses the default configuration. You can also tell redis to use a specific configuration file by starting with the following command.
# cd src # ./redis-server ../redis.conf
redis.conf is a default configuration file. We can use our own configuration file as needed.
After starting the redis service process, you can use the test client program redis-cli and redis service interacted. For example:
# cd src # ./redis-cli redis> set foo bar OK redis> get foo "bar"
To install Redis on Ubuntu system, you can use the following commands:
# sudo apt update # sudo apt install redis-server
# redis-server
# redis-cli
The above command will open the following terminal:
redis 127.0.0.1:6379>
127.0.0.1 is the local IP ,6379 is the redis service port. Now we input the PING command.
redis 127.0.0.1:6379> ping PONG
The above instructions have successfully installed redis.