PHP Redis Extensions installation, configuration, usage summary

Source: Internet
Author: User

System is the lamp environment (centos6.7+apache2.2+mysql5.7+php5.3), the default

Software download to the/USR/LOCAL/SRC directory Redis installed under the/app/local/redis directory

#wget http://download.redis.io/releases/redis-2.8.24.tar.gz

#tar ZXVF redis-2.8.24.tar.gz

#mkdir-P/app/local/redis

#cd redis-2.8.24

#make Prefix=/app/local/redis Install

Start Redis

#/app/local/redis/bin/redis-server

Then install the Phpredis extension

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

#tar ZXVF 2.2.4.tar.gz

#cd phpredis-2.2.4

#/app/local/php/bin/phpize #生成configure配置文件

A configuration file is generated with the following instructions
[Email protected] phpredis-2.2.4]#/app/local/php/bin/phpize configuring for:
PHP Api version:20090626
Zend Module Api no:20090626
Zend Extension Api no:220090626

#./configure--with-php-config=/app/local/php/bin/php-config

#make && make Install

Last build Extension file

Installing Shared extensions:/app/local/php/lib/php/extensions/no-debug-non-zts-20090626/

Then configure PHP.ini

#vi/app/local/php/etc/php.ini

Add after extension

Extension=redis.so

: X

Restart Apache

#/app/local/apache/bin/apachectl restart

Finally, see if the Redis extension is loaded in phpinfo

As shown in the following:

PHP Redis Extensions installation, configuration, usage summary

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.