Redis's official website, Www.redis.io
1. Download Redis First:
wget http://download.redis.io/releases/redis-3.0.3.tar.gz
2. Unzip:
Tar xzf redis-3.0.3.tar.gz
3. Switch to the Redis directory and install
CD redis-3.0.3
Make
4. If an exception occurs, the workaround:
In general, when you execute the make command, you are prompted with an error, one of which is because GCC is not installed
4.1. Installing GCC
Yum-y Intall gcc-c++
4.2. Resolve error:jemalloc/jemalloc.h:no such file or directory
The specific error is as follows:
Zmalloc.h:50:31:error:jemalloc/jemalloc.h:no such file or directory
Zmalloc.h:55:2: Error: #error "Newer version of Jemalloc required"
MAKE[1]: * * * [ADLIST.O] Error 1
MAKE[1]: Leaving directory '/DATA0/SRC/REDIS-2.6.2/SRC '
Make: * * * [ALL] Error 2
Workaround: Add malloc=libc after the make command
Make malloc=libc
5. When the installation is complete, start the Redis-server
Enter the installation directory redis-3.0.3 in this directory you need to be aware that the Redis configuration file is redis.conf
In the entry to the SRC directory,
5.1. Start Redis Server
Redis-server
After you enter the command, the following appears:
5.2. Start the Redis client
Redis-cli
Small test:
Insert a value: SET Name Tommy
Query this value: GET Name
Results:
Redis installation (CentOS 7)