Linux (CentOS 7) installation and configuration redis


Linux (CentOS 7) installation and configuration redis


1. Download reids (official website: , Chinese website: )



I downloaded version 5.0.8


Step 2: installation

  1. Unzip (to opt directory)


tar -zxvf redis-5.0.8.tar.gz -C /opt


2. Check the environment (installation of redis depends on the GCC gcc-c + + environment)

Check out the GCC gcc-c + + environment first

rpm -q gcc
rpm -q gcc-c++

Unload (... On behalf of you)
rpm -e gcc...
rpm -e gcc-c++...

yum -y install gcc
Yum - y install gcc-c + + note: if you have redis version 6.0 or above, upgrade GCC and gcc-c + + environment to gcc9




3. Installation




make && make install


4. Configuration environment


This is the configuration file of redis. We copy it and modify it



Go to this directory and create a new folder



Modify this file







Find this and change to yes to save and exit

5. Start redis

redis-server config/ redis.conf     Start redis according to the specified configuration file

Redis cli - P 6379 through port 6379




Close exit




Recommended Today

Rust and python: why rust can replace Python

In this guide, we compare the rust and python programming languages. We will discuss the applicable use cases in each case, review the advantages and disadvantages of using rust and python, and explain why rust might replace python. I will introduce the following: What is rust? What is Python? When to use rust When to […]