How to install PHP memcache extensions

Source: Internet
Author: User
Tags pear

1, because php_memcached is dependent on libmemcached library, so first install libmemcached library, need to install libmemcached-1.x above version


wget https://launchpad.net/libmemcached/1.0/1.0.16/+download/libmemcached-1.0.16.tar.gz

TAR-ZXVF libmemcached-1.0.16.tar.gz

CD libmemcached-1.0.16

./configure-prefix=/usr/local/libmemcached

Make && make install


2. Install the extension, here we use PHP's own pecl command to install the PHP extension.


/usr/local/webserver/php/bin/pecl Install memcached

Warning:channel "Pecl.php.net" have updated its protocols with "Pecl channel-update pecl.php.net" to update

Downloading memcached-2.2.0.tgz ...

Starting to download memcached-2.2.0.tgz (70,449 bytes)

........... done:70,449 bytes

source files, Building

Running:phpize

Configuring for:

PHP Api version:20121113

Zend Module Api no:20121212

Zend Extension Api no:220121212

libmemcached directory [No]: /usr/local/libmemcached

Building in/tmp/pear/temp/pear-build-rootjtskod/memcached-2.2.0

Running:/tmp/pear/temp/memcached/configure--with-libmemcached-dir=/usr/local/libmemcached

...............................

...............................



3, after the installation is complete in the configuration file add


Vim/usr/local/webserver/php/etc/php.ini


Extension=memcached.so


4. Restart the Web server


Service Nginx Restart


5. Restart PHP


Service PHP-FPM Restart


6. Verification


Php-m|grep Memcache

Memcache

Memcached

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/88/42/wKiom1fsvNnAmf4BAAEkp8to68c802.png-wh_500x0-wm_3 -wmp_4-s_1355174933.png "title=" Image.png "alt=" Wkiom1fsvnnamf4baaekp8to68c802.png-wh_50 "/>

This article is from the "IT" blog, so be sure to keep this source http://wang3781.blog.51cto.com/9428009/1857757

How to install PHP memcache extensions

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.