转载请注明出处:http://www.cnblogs.com/robinjava77/p/5465146.html (Robin)
1)下载redis:wget http://download.redis.io/releases/redis-3.0.3.tar.gz
2)解压redis:tar xzf redis-3.0.3.tar.gz
3)进入目录:cd redis
4)检查环境:./runtest => “You need tcl 8.5 or newer in order to run the Redis test”
5)安装tcl :yum install tcl
6)安装gcc:yum install gcc
7)编译:make => “zmalloc.h:50:31: 错误:jemalloc/jemalloc.h:没有那个文件或目录”
make MALLOC=libc
8)安装:make PREFIX=/usr/local/redis install
9)配置文件移动到ect:cp redis.conf /etc/
10)进入redis目录:cd /usr/local/redis/bin/
11)设置全局命令:cp redis-benchmark redis-cli redis-server /usr/bin/
12)连接redis-server:redis-cli -h ip -p port
说明:由于本次安装,仅提供redis客户端,供测试连接redis-server,执行操作命令。因此,本安装手册,redis-server安装不做详细说明。
简要补充:
启动redis-server后台服务:redis-server /etc/redis.conf &