redis 搭建记录

2017-10-23  本文已影响0人  Leebor

下载

redis官网中选择redis最新稳定版下载

# wget http://download.redis.io/releases/redis-4.0.2.tar.gz

解压缩并安装redis

--> 解压缩
# tar -zxf redis-4.0.2.tar.gz 
# cd redis-4.0.2

--> 安装必须软件包
# yum install -y gcc gcc-c++

--> 编译安装
# make 
# make test
# make PREFIX=/opt/redis-${version} install 
# cp redis.conf /opt/redis-${version}
# cd /opt/redis-${version}/
# bin/redis-server redis.conf

--> 查看redis端口
# netstat -antup | grep 6379
tcp        0      0 127.0.0.1:6379              0.0.0.0:*                   LISTEN      55346/bin/redis-ser 

登录验证

# /opt/redis-4.0.2/bin/redis-cli 
127.0.0.1:6379> ping
PONG
上一篇下一篇

猜你喜欢

热点阅读