CenteOS6.5下Redis安装踩过的坑

一、首先下载redis

wget http://download.redis.io/redis-stable.tar.gz

二、解压redis

tar zvxf redis-stable.tar.gz

三、编译redis

进入redis-stable目录,运行make
此时坑就来了,由于我的机器上之前没有gcc,所以在make的时候找不到gcc还有cc命令,这时就需要给机器上安装gcc编译器

yum -y install gcc
yum -y install gcc-c++ 
yum install make

再进行make,发现会打印一系列的log,看的人真是眼花缭乱,不过还好是编译通过了。

四、编译测试redis

使用make test进行测试,发现又是一堆的log打印,在最后的时候不出意外的话会有如下几个坑:
错误1:
You need tcl 8.5 or newer in order to run the Redis test
解决:

yum install tcl.x86_64

错误2:
[exception]: Executing test client: NOREPLICAS Not enough good slaves to write..NOREPLICAS Not enough good slaves to write.
……
Killing still running Redis server 63439Killing still running Redis server 63486Killing still running Redis server 63519Killing still running Redis server 63546Killing still running Redis server 63574Killing still running Redis server 63591I/O error reading reply
……
解决:

vim tests/integration/replication-2.tcl
  • after 1000
  • after 10000
    *注意:这里的减号是删掉这一行,加号是加上这一行(其实就是将1000改为10000),最初在网上查找这个错误的时候,一脸懵逼,根本不知道这里的减号、加号是什么意思。
    后边的错误也有可能遇不到。*
    错误3:
    [err]: Slave should be able to synchronize with the master in tests/integration/replication-psync.tcl
    Replication not started.
    解决:
    遇见过一次,重试make test就ok了。
    错误4:
    [err]: Test replication partial resync: ok psync (diskless: yes, reconnect: 1) in tests/integration/replication-psync.tcl
    解决:
    vim tests/integration/replication-psync.tcl
  • after 100
  • after 1000
  • 4
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Zerooooooooooooooooo

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值