One, the installation of the PHP Redis extension
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
Second, the installation of the PHP Redis server
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
Start-up service: Redis-server &
Client Connection: REDIS-CLI
Three, common operation
REDIS-CLI Keys \* #查看所有键值信息
Redis-cli-n 1 Keys "test*" | Xargs redis-cli-n 1 del #删除DBID为1的test开头的key值
REDIS-CLI Info #查询系统信息
Installation of the Linux PHP redis extension and the installation of the Redis service