一:redis安裝
Download, extract and compile Redis with:
$ wget http://download.redis.io/releases/redis-3.0.4.tar.gz
$ tar xzf redis-3.0.4. tar.gz
$ cd redis-3.0.4
$ make
The binaries that are now compiled are available in the src directory. Run Redis with:
using the built-in client:$ src/redis-cliredis> set foo barOK
redis> get foo
"bar"
More:http://www.redis.io/down.二、php擴充:
更多版本:http://pecl.php.net/package/redis
wget http://pecl.php.net/get/redis-2.2.5.tgz
tar zxvf redis-2.2.5.tgz#進入安裝目錄cd redis-2.2.5/usr/local/php/bin/phpize#配置
/usr/local/php/bin/phpize
#配置
-config=/usr/local/php/bin/php-config#編譯安裝make && make install安裝完成之後,出現下面的安裝路徑/usr/local/php/lib//extensions /no-debug-non-zts-20090626/
設定php支援
#編輯設定文件,在最後一行加入以下內容
redis小範例: