centos6.6源码编译安装redis4.0

Redis
安装位置:/usr/local/redis
需要安装依赖tcl >= 8.5


redis官网下载redis到本地。移动至想要安装的目录。

mv redis-4.0.9 /usr/local/redis
cd /usr/local/redis 
make 

这里写图片描述
配置完成后到Redis安装目录:

cd /usr/local/redis/src

启动

这里要注意提前修改redis.conf文件中的daemonize no 一行。改noyes。允许作为守护进程启动。

[root@bogon src]# ./redis-server &
[1] 3059
[root@bogon src]# 3059:C 28 Apr 15:34:58.985 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
3059:C 28 Apr 15:34:58.986 # Redis version=4.0.9, bits=64, commit=00000000, modified=0, pid=3059, just started

3059:C 28 Apr 15:34:58.986 # Warning: no config file specified, using the default config. In order to specify a config file use ./redis-server /path/to/redis.conf
3059:M 28 Apr 15:34:58.987 * Increased maximum number of open files to 10032 (it was originally set to 1024).

略去标志图案
3059:M 28 Apr 15:34:58.989 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
3059:M 28 Apr 15:34:58.989 # Server initialized

停止

./redis-cli shutdwon

或者kill掉。

注释:redis官方没有使用init.d来管理redis。推荐使用自带组件sentinel来管理redis。强行使用service报错start-stop-daemon.c找不到。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值