Linux (CentOS 7) installation and configuration redis
1. Download reids (official website: redis.io , Chinese website: www.redis.cn )
I downloaded version 5.0.8
Step 2: installation
-
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
see
rpm -q gcc
rpm -q gcc-c++
Unload (... On behalf of you)
rpm -e gcc...
rpm -e gcc-c++...
install
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