你的位置:首页 > 操作系统

[操作系统]linux php redis扩展的安装和redis服务的安装

一、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
makemkdir /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                                             #查询系统信息