Test in: Redis2.6.17 | CentOS 5.7
installation: download Redis directly on Linux via wget mode
wget http://download.redis.io/releases/redis-2.6.17.tar.gz
Unzip the downloaded redis-2.6.17.tar.gz file
TAR-ZXVF redis-2.6.17.tar.gz
into the unpacked folder
CD redis-2.6.17
Compiling the installation
Make
run: You can start the Redis service by executing the redis-server under the SRC folder:
$ src/redis-server
Redis Start screen is as follows:
You can access the Redis service by executing the REDIS-CLI under the SRC folder.
$ src/redis-cli
redis> set foo bar
ok
redis> get foo
"Bar"
problems that may occur during the installation: CentOS5.7 does not have GCC installed by default, which causes us to fail to make a success. Using Yum Installation:
Yum-y Install GCC
Make times the following error:
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
The reason is that Jemalloc overloads the malloc and free functions of ANSI C under Linux. Workaround: Add parameters when make.
Make MALLOC=LIBC
After make, a prompt appears
But do not test, usually can be used. If we run make test, we have the following hints
[Devnote@devnote src]$ make Test your
need TCL 8.5 or newer in order to run the Redis test make
: ***[test] error_1
The solution is to install tcl8.5 with Yum (or go to Tcl's official website http://www.tcl.tk/Download the 8.5 version, and refer to the website introduction for installation)
Yum Install Tcl
References: http://blog.csdn.net/liuxingyu_21/article/details/16116561
Http://redis.io/download http://www.oschina.net/question/12_18065