Installing the memcached Extension

Source: Internet
Author: User
Tags install php memcached

PHP extension needs to go to a dedicated web site to find the expansion pack, this site is http://pecl.php.net/this is a PHP extension package site, you can find PHP on this site on memcached extension package, search memcached later, I downloaded memcached-2.2.0.tgz, and then we formally entered the process of installing the memcached extension (as if we had said a lot of nonsense ...). Anyway, no one has read my blog.

Download libmemcached First:

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

Unpacking: TAR-ZXF libmemcached-1.0.18.tar.gz

Enter the unpacked package and compile the installation:

./configure--prefix=/usr/local/libmemcached--with-memcached//Note:--with-memcached This option must be added

Make && make install

After the installation is complete, start installing the Memcached module:

wget http://pecl.php.net/get/memcached-2.2.0.tgz

Unpacking: TAR-ZXF memcached-2.2.0.tgz

Enter the directory after unpacking, first use the phpize command to generate a configure file

Phpize///Here you need to explain, this command is compiled to install PHP in the installation directory under the Bin directory, but in the Yum installation of PHP need to install a package called Php-devel will have (I have been a pit here ...) )

./configure--with-php-config=/usr/bin/php-config--with-libmemcached-dir=/usr/local/libmemcached

Php-config here if you don't know where it is, you can find it with the Find/-name php-config command.

Make && make install

After the installation is complete, you need to add a extension=memcached.so record in the php.ini file, and then use the PHP-M command to see the memcached module.


Installing the memcached Extension

Related Article

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.