Php redis extension installation, configuration, usage summary, redis Summary

Source: Internet
Author: User
Tags php redis

Php redis extension installation, configuration, usage summary, redis Summary

The system is a lamp environment (centos6.7 + apache2.2 + mysql5.7 + php5.3). The default value is

Download the software to the/usr/local/src directory. Install redis in 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

Install 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 # generate the configure configuration file

The configuration file is generated as follows:
[Root @ localhost phpredis-2.2.4] #/app/local/php/bin/phpize locking ing:
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

Generate the extension file

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

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, check whether the redis extension is loaded in phpinfo.

As shown in:

 

 

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.