CentOS6 编译安装 redis-3.2.3

一、获取安装文件

$ pwd
/user/***
$ wget http://download.redis.io/releases/redis-3.2.3.tar.gz

二、解压文件并移动文件

$ tar xzf redis-3.2.3.tar.gz
$ mv redis-3.2.3 /usr/local/redis

三、进入文件夹目录

$ cd /usr/local/redis

四、编译安装

$ make 

五、安装依赖包

$ cd src && make test
You need tcl 8.5 or newer in order to run the Redis test
make: *** [test] 错误 1

$ yum install tcl
已加载插件:fastestmirror, security
设置安装进程
Loading mirror speeds from cached hostfile
.............

六、再次编译安装

$ make 
$ cd src 
$ make test

七、make test报错及修改

[err]: Test replication partial resync: ok psync (diskless: yes, reconnect: 1) in tests/integration/replication-psync.tcl

Expected condition '[s -1 sync_partial_ok] > 0' to be true ([s -1 sync_partial_ok] > 0)

出现这个问题的原因可能是"测试点在配置比较低的机器上会因为超时而过不了"  

在解压目录中修改
# vi tests/integration/replication-psync.tcl
把 after 100 改成 after 500

八、设置配置文件路径

$ mkdir /etc/redis
$ cp /usr/local/redis/redis.conf /etc/redis

九、加入开机启动

echo "/usr/local/redis/src/redis-server /etc/redis/redis.conf &" >> /etc/rc.local

十、启动redis-server 及redsi-cli

$ /usr/local/redis/src/redis-server /etc/redis/redis.conf &

$ /usr/local/redis/src/redis-cli 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值