Linux php redis extension installation and redis service installation, linuxredis

Source: Internet
Author: User
Tags php redis

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.