Redis installation~~

What is Redis

Redis (Remote Dictionary Server), the remote dictionary service!

It is an open source log-type, Key-Value database that is written in ANSIC language, supports the network, can be based on memory and can be persisted, and provides APIs in multiple languages.

Redis periodically writes updated data to disk or writes modification operations to additional record files, and on this basis, it realizes master-slave (master-slave) synchronization.

Free and open source! It is one of the most popular NoSQL technologies at the moment! It is also called a structured database!

What can Redis do

1. Memory storage and persistence. The memory is lost when power is off, so persistence is very important (rdb, aof)
2. It is highly efficient and can be used for high-speed caching
3. Publish and subscribe system
4. Map information analysis
5. Timing Finder, counter (views!)
6,...

characteristic

1. Diverse data types
2. Persistence
3. Cluster
4. Transaction
5.…

Windows installation

Redis compressed package

After downloading, decompress
Insert picture description here
Insert picture description here
and double-click to start.
Insert picture description here
Use the client to connect to Redis.
Insert picture description here
Insert picture description here
Insert picture description here
The ping command is connected successfully.
Insert picture description here
Since it is stored in the form of key-value pairs, a simple access process can be realized as shown in the figure.

However, in daily development and use, we recommend that it be carried out in the Linux environment.

Linux installation

Command: wget http://download.redis.io/releases/redis-5.0.8.tar.gz
Insert picture description here
Unzip: tar -zxvf redis-5.0.8.tar. gz
Insert picture description here
Redis configuration file
Insert picture description here
Basic environment installation:

yum install gcc-c++
make

Make again
Insert picture description here

make install

Insert picture description here

Redis default installation path: /usr/local/bin

Insert picture description here

Create a folder in the bin directory and copy the configuration file here

Insert picture description here

Modify the configuration file
Insert picture description here

In this way, it is started in the background by default.

Start the Redis service
redis-server kconfig/redis.conf

Insert picture description here

Client connection service
redis-cli -p 6379

Insert picture description here

Insert picture description here
This is the same as under Windows.

Check whether the Redis process is started

Insert picture description here

Guess you like

Origin blog.csdn.net/AIJXB/article/details/113817419