linux下安装redis(单机)

1、下载redis,http://download.redis.io/releases/redis-3.2.7.tar.gz

2、linux用的是centos6.5

3、把redis上传到centos6.5中,我放在/usr/software中

4、解压 tar -zxvf /usr/software/redis-3.2.7.tar.gz -C /usr/local/

5、进入redis cd /usr/local/redis-3.2.7/

  1. yum install gcc-c++

7、执行make MALLOC=libc

最后执行 /usr/local/redis-3.2.7/src/redis-server /usr/local/redis-3.2.7/redis.conf

如果出现

即为成功

一些设置

1、修改redis服务器的配置文件
vi redis.conf

注释以下绑定的主机地址,支持远程登录(protected-mode yes 改为no)

# bind 127.0.0.1  
protected-mode no

在编译redis3.2.9时报错

cc: ../deps/hiredis/libhiredis.a: No such file or directory
cc: ../deps/lua/src/liblua.a: No such file or directory
cc: ../deps/geohash-int/geohash.o: No such file or directory
cc: ../deps/geohash-int/geohash_helper.o: No such file or directory
make[1]: *** [redis-server] Error 1
make[1]: Leaving directory `/usr/local/src/redis-3.2.9/src'
make: *** [all] Error 2

解决办法

进入源码包目录下的deps目录中执行

make geohash-int hiredis jemalloc linenoise lua

然后再进行make编译就可以了

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值