PHP installation memcached extension notes, phpmemcached extension
Recently in the server upper cache system, log the PHP installation memcached extension.
Copy the Code code as follows:
# Install service side
Yum Install Memcached-y
I. Launchpad
Please download the latest version of Libmemcached (20150524) at Https://launchpad.net/libmemcached/+download
Copy the Code code 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. Installing the memcached Extension
Locate and install the PHP memcached extension in pecl (the PHP Extension Community Library).
Copy the Code code as follows:
In pecl you can find the following two easily confusing PHP extensions for memcache, can you tell them apart? Do you know why we use the former? Please the reader purple star Google!
memcached PHP extension for interfacing with memcached via Libmemcached Library
Memcache memcached Extension
[Https://pecl.php.net/package/memcached] [4] Currently the latest version is 2.2.0
Copy the Code code as follows:
Mkdir/usr/src/php-p
cd/usr/src/php
wget Https://pecl.php.net/get/memcached-O memcached-2.2.0.tgz
Tar XF memcached-2.2.0.tgz
CD memcached-2.2.0
Phpize
# We have added some new features in the configuration to enable it to support JSON and igbinary, and to be available to study
./configure--enable-memcached--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/
Below we will move it to PHP's extension directory
Copy the Code code as follows:
cp/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/*.so/usr/local/php/lib/php/extensions/
III. Configuring PHP.ini
Open the php.ini file that is in effect
Copy the Code code as follows:
Vim/usr/local/php/etc/php.ini
# Add the following configuration
[Memcached]
Extension=memcached.so
http://www.bkjia.com/PHPjc/1008014.html www.bkjia.com true http://www.bkjia.com/PHPjc/1008014.html techarticle PHP installation memcached extension notes, phpmemcached extension recently in the server upper cache system, record the PHP installation memcached extension. Copy the code code as follows: # Install server yum ...