Redis installation and installation of PHP Redis extensions

Source: Internet
Author: User
Tags download redis php redis redis install redis

One, install Redis

1, download Redis package: wget http://download.redis.io/releases/redis-2.8.9.tar.gz

2, unpack the Redis package, enter the redis-2.8.9 directory, compile

Make first

Then make install

Finally run the Redis service-side/usr/local/bin/redis-server (service-side REDIS-CLI)


3. So far, even if the installation has been completed Redis;

(PHP does not use Redis at this time because there is no intermediate contact between PHP and Redis: Redis extension)

(Error: Fatal error:class ' Redis ' not found in/home/huyi/www.php.com/shopping/redis_goods.php to line 9)

Two, now is the installation of PHP Redis extension

1, download Address: Http://pecl.php.net/package/redis

2, select the version you want:


3. Download the file, use the RZ command to upload to the Linux machine, I upload the directory is/usr/local

4. Installation:

TAR-ZXVF redis-3.0.0.tgz

CD redis-3.0.0

/usr/local/php/bin/phpize #用phpize生成

./configure--with-php-config=/usr/local/php/bin/php-config #配置

Make

Make install

To this extended download installation complete

5, configure php.ini files so that PHP can support Redis extensions

Vim/etc/php.ini

Add this line in: Extension = redis.so

Restart service;

Test under Phpinfo (); You can now see Redis extension support;



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.