Install the Redis extension and the linuxphpredis extension in php in Linux.

Source: Internet
Author: User
Tags install redis

Install the Redis extension and the linuxphpredis extension in php in Linux.

Note: The directory permission chomd 777-R

 

1. Install redis

Download: https://github.com/nicolasff/phpredis/archive/2.2.4.tar.gz

Upload phpredis-2.2.4.tar.gz to the/usr/local/src directory.

Cd/usr/local/src # enter the package storage directory

Tar zxvf phpredis-2.2.4.tar.gz # Extract

Cd phpredis-2.2.4 # enter the installation directory

/Usr/local/php/bin/phpize # Use phpize to generate the configure configuration file

./Configure -- with-php-config =/usr/local/php/bin/php-config # Configuration

Make # compile

Make install # install

After the installation is complete, the following installation path appears:

/Usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/

2. Configure php support

Vi/usr/local/php/etc/php. ini # edit the configuration file and add the following content in the last line:

Add

Extension = "redis. so"

: Wq! # Save and exit

 

 

3. Restart the service

Sudo service nginx restart

Sudo/etc/init. d/php-fpm restart

 


Add redis extension in php

Check the error log ~

How is php configured to support redis? What else do I need to extend?

Redis does not need the support of php...
 

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.