Linux php redis extension installation and redis service installation, linuxredis
I. php redis extension Installation
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
Ii. php redis Server Installation
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 the service: redis-server &
Client Connection: redis-cli
Iii. Common Operations
Redis-cli keys \ * # view all key value information
Redis-cli-n 1 keys "test *" | xargs redis-cli-n 1 del # Delete the key value starting with test with DBID 1
Redis-cli info # Query System Information