标签:
一、php redis扩展的安装
wget http://pecl.php.net/get/redis-2.2.7.tgz
tar zvxf redis-2.2.7.tgz
cd redis-2.2.7
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
redis.so
二、php redis服务器的安装
wget http://download.redis.io/releases/redis-3.0.1.tar.gz
tar xzf redis-3.0.1.tar.gz
cd redis-3.0.1
make
mkdir /usr/local/redis
cp src/redis-server /usr/local/redis
cp src/redis-benchmark /usr/local/redis
cp src/redis-cli /usr/local/redis
cp src/redis.conf /usr/local/redis
cd /usr/local/redis
启动服务:redis-server &
客户端连接: redis-cli
三、常用操作
redis-cli keys \* #查看所有键值信息
redis-cli -n 1 keys "test*" | xargs redis-cli -n 1 del #删除DBID为1的test开头的key值
redis-cli info #查询系统信息
linux php redis扩展的安装和redis服务的安装
标签:
原文地址:http://www.cnblogs.com/niun/p/4538891.html