1. Go to the reIDS website to download the version you want to install

The Linux version of redis – 6.2.1. Tar. Gz

Redis official website Redis Chinese official website
http://redis.io redis.cn/

2. Installation procedure

2.1 Preparations: Download and install the GCC compiler of the latest version

#yum install centos-release-scl scl-utils-build

#yum install -y devtoolset-8-toolchain

#scl enable devtoolset-8 bash

Testing the GCC version

gcc –version

Y yum install GCC yum yum install GCC

2.2 Download Redis-6.2.1.tar. gz To the /home/redis directory

Decompress the command: go to the /home/redis directory and run tar -zxvf redis-6.2.1.tar.gz

2.3 After decompression, go to CD Redis-6.2.1

2.4 Run make command again in redis-6.2.1 (only compiled)

Jemalloc/jemalloc.h: does not have that file. (The installation failed because there is no Internet connectionwww.baidu.com, ping different use the following link to solve this problem) (www.pianshen.com/article/844…)

2.6 Solution: Run make distclean

2.7 Run the make command again in redis-6.2.1 (only compiled)

2.8 Skip make test and continue to make install

3. The default redis installation directory

View the default installation directory:

Redis-benchmark: performance test tool, you can run in your own book, check your own book performance

Redis-check-aof: fix the problem of aOF files. RDB and AOF will be discussed later

Redis-check-dump: Repair the dump. RDB file

Redis-sentinel: used by the Redis cluster

Redis-server: indicates the command used to start the redis server

Redis – CLI: client, operation entry

3.1 Foreground Startup (not recommended) Closing the window service is closed

3.2 Background Startup (Recommended)

(1) Back up the redis configuration file redis.conf

Make a copy of redis. Conf to another directory

Cp/home/redis/redis – 6.2.1 / redis. Conf/home/redis

(2) Set daemonize no to yes

Conf (128 lines) file and change daemonize no to yes to start the service in the background

Redis start redis-server /home/redis/redis.conf

(4) Use client to access Redis – CLI

(5) Exit the client using exit

(6) run the shutdown command on the redis client to shutdown the redis service. (7) start the redis service without connecting to the client

You can also access the terminal and then close it

Multi-instance shutdown and specified port shutdown: redis-cli -p 6379 shutdown

(8) Close the Redis service using the process id