centos6.5 redis应用环境搭建

1. 官网下载安装

需要安装 ctl 支持  yum install ctl

> wget http://download.redis.io/releases/redis-3.0.5.tar.gz > tar -zxvf redis-3.0.5.tar.gz.tar.gz > cd redis-3.0.5.tar.gz > make && make install (--prefix=/usr/local/redis)

2. 配置安装redis

-> cp /redis-3.0.5/redis.conf /etc/redis.conf 

-> vi /etc/redis.conf


简单配置:

time 0 更改为 time 300

设置daemonize为yes

3. 启动redis服务

cd /usr/local/bin/

./redis-server /etc/redis.conf   #启动服务

./redis-cli # 启动客户端

##安装phpredis 的扩展支持

下载相应版本:http://download.redis.io/releases/

安装:

#解压后

>phpize

> ./configure  

> make && make install

编辑 php.ini 增加redis.so

重启相应应用服务。

原文地址:https://www.cnblogs.com/hubing/p/4956079.html