PHP install memcached extension notes, phpmemcached extension _ PHP Tutorial

Source: Internet
Author: User
Tags php server zts
Install memcached extension notes in PHP and phpmemcached extension. Install memcached extension notes in PHP. the phpmemcached extension was recently stored in the Upper Cache system of the server. record the installation of memcached extension in PHP. Copy the code as follows: # install the yum PHP server to install memcached extension notes and phpmemcached extension

Recently, in the Upper Cache system of the server, record how to install the memcached extension in PHP.
The code is as follows:
# Install the server
Yum install memcached-y

I. launchpad

Please download the latest version of libmemcached (20150524) at https://launchpad.net/libmemcached/javasdownload)
The code is as follows:
Cd/tmp
Wget https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz
Tar zxf libmemcached-1.0.18.tar.gz
Cd libmemcached-1.0.18
./Configure
Make
Make install

II. install memcached extension

Find and install The memcached Extension of PHP in PECL (The php Extension Community Library.
The code is as follows:
In PECL, you can find the following two PHP extensions of memcache that are easy to confuse. can you tell the differences between them? Do you know why we should use the former? Please refer to Zixing Google!
Memcached PHP extension for interfacing with memcached via libmemcached library
Memcache memcached extension

[Https://pecl.php.net/package/memcached3164] the latest version is 2.2.0.

The code is as follows:
Mkdir/usr/src/php-p
Cd/usr/src/php
Wget-O https://pecl.php.net/get/memcached
Tar xf memcached-2.2.0.tgz
Cd memcached-2.2.0
Phpize
# Add some new functions in the configuration so that they support json and igbinary. if you have time, study them.
./Configure -- enable-memcached-json -- enable-memcached-igbinary
Make
Make install
# Note the final output
# Installing shared extensions:/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/

Next we will move it to the extension directory of php.
The code is as follows:
Cp/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/*. so/usr/local/php/lib/php/extensions/

III. configure PHP. ini

Open the active php. ini file
The code is as follows:
Vim/usr/local/php/etc/php. ini

# Add the following configurations
[Memcached]
Extension = memcached. so


The supervisor recently installed the memcached extension in PHP in the Upper Cache system of the server. The code is as follows: # install the server yum...

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.