学海无涯学海无涯

I am a slow walker,
but i never walk backwards.

CentOS7中编译安装redis5.0

1.环境介绍

CentOS7

2.下载Redis5.0-rc3

wget -O redis-5.0-rc3.tar.gz https://github.com/antirez/redis/archive/5.0-rc3.tar.gz

3.解压redis

tar -zxvf redis-5.0-rc3.tar.gz -C /usr/local

4.编译并安装

cd /usr/local/redis-5.0-rc3
make

出现如下即编译成功:

Hint: It's a good idea to run 'make test' 
make[1]: Leaving directory `/usr/local/redis-5.0-rc3/src'

然后在/usr/local/redis-5.0-rc3/src中执行安装命令:

cd /usr/local/redis-5.0-rc3/src
make install

会出现如下日志信息:

Hint: It's a good idea to run 'make test' 

INSTALL install
INSTALL install
INSTALL install
INSTALL install
INSTALL install

5.修改redis.conf配置文件

vim /usr/local/redis-5.0-rc3/redis.conf

只需要调整如下几个即可:

protected-mode no # 关闭保护模式
daemonize yes     # 守护进程模式开启

6.启动redis5.0

/usr/local/redis-5.0-rc3/src/redis-server /usr/local/redis-5.0-rc3/redis.conf

检查端口:

netstat -ltnp |grep 6379

如果有端口监听,说明redis已经启动成功.

本原创文章未经允许不得转载 | 当前页面:学海无涯 » CentOS7中编译安装redis5.0

评论