Website address: http://redis.io/
Official website: 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
[[email protected] redis-2.8.17]# make
cd src && make 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 directory `/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.
[[email protected] redis-2.8.17]# make
cd src && make 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
Linux server running Environment Building (ii)--redis database installation