Website address: http://redis.io/
Official website Download Address: http://redis.io/download
1. Download the Redis source code (tar.gz) and upload it to Linux
2. Unpacking package: Tar zxvf redis-2.8.17.tar.gz
3. Enter the extracted folder: CD redis-2.8.17
4. Compiling source code: Make
(1) If the following prompt appears, then the GCC is not installed, use the command to install Gcc:yum installed GCC
[Root@localhost redis-2.8.17]# make
cd src && do all
make[1]: Entering directory '/root/redis-2.8.17/ Src '
CC adlist.o
/bin/sh:cc:command not found
make[1]: * * * [ADLIST.O] Error 127
make[1]: leaving direct Ory '/root/redis-2.8.17/src ' make
: * * * [ALL] Error 2
(2) If the following prompt appears, change make to malloc=libc, presumably because of the problem of compiling the library.
[Root@localhost redis-2.8.17]# make
cd src && do all
make[1]: Entering directory '/root/redis-2.8.17/ Src '
CC adlist.o in
file included from adlist.c:34:
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 '/root/redis-2.8.17/src ' make
: * * * [ALL] Error 2
5. Install the compiled file: make Install,redis executable file will be copied to/usr/local/bin/, but not configured, manual copy configuration: CP Redis.conf/usr/local/bin
6. Set up the Redis password, edit the profile you just copied: VI redis.conf, dismiss the Requirepass parameter comment, and set the value, for example: Requirepass ljx520
7. Start the Redis database using a configuration file:./redis-server redis.conf
If you see the following interface, then congratulations, Redis has been installed successfully