您的位置:首页 > 数据库 > Redis

redis-安装

2015-12-14 00:00 681 查看
摘要: redis.version = 3.0.5
os = centOS6.7

redis-3.0.5.tar.gz 。 downLoad:http://redis.io/

step1. 将redis-3.0.5.tar.gz解压到指定目录,并切换至该目录

tar -zxvf redis-3.0.5.tar.gz -C ./ProgramFile/redis/

cd ~/ProgramFile/redis/redis-3.0.5

step2.进行编译

make

可能出现的错误
1.make[2]: cc: Command not found

异常原因:没有安装gcc
解决方案:yum install gcc-c++

2.
zmalloc.h:51:31: error: jemalloc/jemalloc.h: No such file or directory

异常原因:一些编译依赖或原来编译遗留出现的问题
解决方案:make distclean。清理一下,然后再make。
step3.进行 make test

make test

可能出现的错误:

错误1

You need tcl 8.5 or newer in order to run the Redis test

异常原因:没有安装tcl
解决方案:yum install -y tcl。 错误2
!!! WARNING The following tests failed:

*** [err]: Server is able to generate a stack trace on selected systems in tests/integration/logging.tcl
expected stack trace not found into log file
Cleanup: may take some time... OK

原因未知:但即使出现了上面的问题最后还是能将编译后的redis运行起来

有侍解决

setp4 启动 redis

./ProgramFile/redis/redis-3.0.5/src/redis-server ./redis.conf

step5 redis启动客户端

./ProgramFile/redis/redis-3.0.5/src/redis-cli

参考出处:http://www.cnblogs.com/haoxinyue/p/3620648.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  redis 安装