前端之家收集整理的这篇文章主要介绍了
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
原文链接:https://www.f2er.com/centos/380301.html