centos6.6源码编译安装redis4.0,centos6.6redis4.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一行。改no为yes。允许作为守护进程启动。
[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找不到。
本站文章为和通数据库网友分享或者投稿,欢迎任何形式的转载,但请务必注明出处.
同时文章内容如有侵犯了您的权益,请联系QQ:970679559,我们会在尽快处理。