Version: redis-2.8.19.tar.gz
Check whether the following dependencies are installed, or there will be exceptions if you do not want to install them first.
Yum installgcc-c++
Yum install-y tcl .
1 , get the installation file
Redis-2.8.19.tar.gz
Http://redis.io/download
2 , unzip the file
TAR-XZVF redis-2.8.19.tar.gz
MV Redis-2.8.19/usr/local/redis
3 , enter the directory
CD Redis
4 , compiling
Make
5 , installation
Make install
6 , set the configuration file path
Mkdir-p/etc/redis
CP Redis.conf/etc/redis
7 , modify the configuration file
Vi/etc/redis/redis.conf
Modify only: daemonize Yes
8 , start
/usr/local/bin/redis-server/etc/redis/redis.conf
9 , view startup
Ps-ef | grep Redis
Ten , using the client
Redis-cli
>set Namedavid
Ok
11. Close the Client
REDIS-CLI shutdown
12. Exceptions and Workarounds
Exception One:
MAKE[2]: Cc:command not found
exception Reason: not installed GCC
Solution: Yum Install gcc-c++
Exception Two:
Zmalloc.h:51:31:error:jemalloc/jemalloc.h:no such file or directory
Exception reason: Some compiler dependencies or original compilation legacy problems
Solution: Make Distclean . Clean it up and make it again .
in the Make after success, you need to Make test . An exception occurred in make test .
Exception One:
Couldn ' Texecute "tclsh8.5": No such file or directory
exception Reason: not installed Tcl
If you do not first installTclin the compilationRedisthe time to executeMake testThe following error will be reported, this step can also be omitted, do not performMake testDirect ExecutionMake InstalltheRedishas no effect on startup and shutdown.
[Email protected]]# make test
CD src &&make test
MAKE[1]: enteringdirectory '/usr/local/webserver/redis/src '
You need TCL 8.5 ornewer on order to run the Redis test
MAKE[1]: * * * [Test]error 1
MAKE[1]: leavingdirectory '/usr/local/webserver/redis/src '
Make: * * * [Test]error 2
CentOS 6.5 Installation Redis