Installation of the Linux PHP redis extension and the installation of the Redis service

Source: Internet
Author: User
Tags php redis redis server

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

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.