Installing Memcache modules for PHP extensions under Linux

Source: Internet
Author: User

installing memcache modules for PHP extensions under Linux

2011-09-05 13:31:00| Category: Linux| Report | Font size Subscription

sh# wget http://www.danga.com/memcached/dist/memcached-1.2.6.tar.gz
sh# wget http://www.monkey.org/~provos/libevent-1.4.6-stable.tar.gz
sh# wget http://pecl.php.net/get/memcache-3.0.1.tgz

sh# TAR-ZXVF libevent-1.4.6-stable.tar.gz
sh# CD libevent-1.4.6-stable
sh#./configure-prefix=/usr/local/libevent
sh# make
sh# make Install
sh# CD. /
sh# TAR-ZXVF memcached-1.2.6.tar.gz
sh# CD memcached-1.2.6
sh#./configure--prefix=/usr/local/memcache--with-libevent=/usr/local/libevent
sh# make
sh# make Install

Installing PHP's Memcache extension

1 You can use the PECL installer that comes with PHP
#/usr/local/servers/php5/bin/pecl Install Memcache

2 sh# CD. /
sh# TAR-ZXVF memcache-3.0.1.tgz
sh# CD memcache-3.0.1
sh#/usr/local/bin/phpize (first to perform this, the path is obtained by: sh# which phpize)
sh#./configure-enable-memcache-with-php-config=/usr/local/bin/php-config-with-zlib-dir (Path by: sh# which php-config Gets
sh# make
sh# make install (Hint: Installing shared extensions:/USR/LOCAL/LIB/PHP/EXTENSIONS/NO-DEBUG-NON-ZTS-20060613/is successful)

After installation, there will be a hint like this:
Installing Shared extensions:/usr/local/servers/php5/lib/php/extensions/no-debug-non-zts-20060922/

Keep this in mind and then modify the php.ini to put

Extension_dir = "./"
Revision changed to
Extension_dir = "/usr/local/servers/php5/lib/php/extensions/"

and add a row
extension= "No-debug-non-zts-20060922/memcache.so"

Memcache Monitor: http://livebookmark.net/journal/'s memcache.php

Memcache start: sh#/usr/local/memcached/bin/memcached-u root-d-M 200-l 10.2.0.88-p 11211

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.