Assemble RedisPHP extension

Source: Internet
Author: User
How to install the RedisPHP extension :???? Operating system: CentOSphp installation directory: usrlocalphpphp. ini configuration file path: usrlocalphpetcphp. ining.pdf installation directory: usrlocalnginxNginx website root directory: usrlocalnginxhtml? 1. install the compilation tool yuminstall to install the Redis PHP extension.

Note:
? ? ? ? Operating system: CentOS

Php installation directory:/usr/local/php

Php. ini configuration file path:/usr/local/php/etc/php. ini

Nginx installation directory:/usr/local/nginx

Nginx website root directory:/usr/local/nginx/html

?

1. install the compilation tool

Yum install wget? Make gcc-c ++ zlib-devel openssl-devel pcre-devel kernel keyutils? Patch perl

2. 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? # Decompress

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 ?? # Installation

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

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

3. 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

Restart php-fpm

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.