How to use Redis and PHPredis

Authors: Bruce Dou
Address:

doubaokun@gmail.com

http://blog.eood.cn/


Copyright (c) 2010 Bruce Dou.

This documentation and the software it describes is covered by The MIT License:

http://www.opensource.org/licenses/mit-license.php.

Redis installation in Linux

Installation:


yum install git

git clone git://github.com/antirez/redis

cd redis

./redis-server

./redis-cli

Files:


redis-benchmark

redis-cli

redis-server

redis-stat

redis.conf

./redis-server ./redis.conf

Configure in redis.conf set demon to be yes.

Start redis server:


./redis-server ./redis.conf

Phpredis installation in Linux


git clone git://github.com/owlient/phpredis

cd phpredis

phpize

./configure

make && make install

Configure in php.ini:


vi /etc/php.ini

append a new line:

extension=redis.so