Quick installation of php-memcached extension through pecl-php Tutorial

Source: Internet
Author: User
Quick installation of php-memcached extension via pecl quick installation of php-memcached extension via pecl
In the past, php-memcached was always installed through source code compilation. the dependency and compilation speed kept you waiting. We can learn from the internet that we can use pecl to quickly install this extension. here we will organize and record it.



System environment: CentOS-7.1 Php memcached module 1. install libmemcached

# Yum-y install libmemcached-devel Loaded plugins: langpacksResolving Dependencies --> Running transaction check ---> Package libmemcached-devel.x86_64. 0.16-3. el7 will be installed --> Processing Dependency: cyrus-sasl-devel (x86-64) for package: libmemcached-devel-1.0.16-3.el7.x86_64 --> Running transaction check ---> Package cyrus-sasl-devel.x86_64 0: 2. 1.26-17. el7 will be installed --> Processing D Ependency: cyrus-sasl (x86-64) = 2.1.26-17. el7 for package: cyrus-sasl-devel-2.1.26-17.el7.x86_64 --> Running transaction check ---> Package cyrus-sasl.x86_64 0: 2. 1.26-17. el7 will be installed ............ Omit several rows ............ Installed: libmemcached-devel.x86_64. 0.16-3. el7 Dependency Installed: cyrus-sasl.x86_64. 1.26-17. el7 cyrus-sasl-devel.x86_64. 1.26-17. el7 Complete!
 
2. install the php-memcached extension


# Pecl install memcached WARNING: channel "pecl.php.net" has updated its protocols, use "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 15 source files, building running: phpize indexing ING for: PHP Api Version: 20100412 Zend Module Api No: 20100525 Zend Extension Api No: 220 100525 libmemcached directory [no]:/usr building in/var/tmp/pear-build-rootb7OPED/memcached-2.2.0 running: /var/tmp/memcached/configure -- with-libmemcached-dir =/usr ............ Omit several rows ............ Build process completed successfully Installing '/usr/lib64/php/modules/memcached. so 'Install OK: channel: // pecl.php.net/memcached-2.2.0 configuration option "php_ini" is not set to php. ini location You shoshould add "extension = memcached. so "to php. ini

Memcached php module

3. append the module to the php. ini file.


# extension=memcached.so



Tips: If you cannot install memcached by directly using pecl install memcached, you can use the following method --


# pecl download memcached# tar zxvf memcached-xxx# cd memcached-xxx# phpize# ./configure --with-libmemcached-dir=/xxxx/xxx/xxx




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.