欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

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

程序员文章站 2022-06-28 22:23:02
...

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


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

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

centos6.6源码编译安装redis4.0
配置完成后到Redis安装目录:

cd /usr/local/redis/src

启动

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

[aaa@qq.com src]# ./redis-server &
[1] 3059
[aaa@qq.com 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找不到。

相关标签: redis 编译安装