First, make a list of installation steps:
1. Mount the installation package redis-3.0.6.tar.gz to the system root directory with WINSCP
2. Decompression: Tar zvxf redis-3.2.1.tar.gz
3. Access to directory: CD redis-3.2.1
4. Compile: Make
5. Enter src directory: cd src, compiling: Make install
Second, the problems encountered:
1. There are no GCC and gcc-c++ installed, the error is shown below:
Solution:
Yum install gcc
yum install gcc-c++
It is possible to install Tcl(if make test appears with the need TCL 8.5 or newer in order to run the Redis test)
Yum Install Tcl
2.ZMALLOC.H:50:31: Fatal error: jemalloc/jemalloc.h: no file or directory
Problem Reason:
There is this passage in the README.
Allocator---------Selecting a Non-default memory allocator when building Redis was done by setting the ' MALLOC '
environment variable. Redis is compiled and linked against libc malloc by default, with the exception of Jemalloc
Being the default on Linux systems. This default is picked because Jemalloc has proven to have fewer
Fragmentation problems than libc malloc. To force compiling against libc malloc, use:% make MALLOC=LIBC
To compile against Jemalloc in Mac OS X systems, use:% make Malloc=jemalloc
Say about allocator allocator, if have malloc this environment variable, will use this environment variable to build Redis. And libc is not the default allocator, the default is Jemalloc,
Because Jemalloc has been shown to have fewer fragmentation problems than libc. But if you do not have jemalloc and only libc of course make error.
So add such a parameter.
Workaround:
[Root@localhost src]# make MALLOC=LIBC