Linux memcache extension method for installing PHP

Source: Internet
Author: User

Download Install memcached server

    1. Yum Install Libevent-devel
    2. wget http://memcached.googlecode.com/files/memcached-1.4.5.tar.gz
    3. TAR-ZXVF memcached-1.4.5.tar.gz
    1. ./configure--prefix=/usr/local/memcached--build=i686-pc-linux-gnu

This step will see a lack of GCC

    1. Yum Install GCC
    2. ./configure--prefix=/usr/local/memcached
    3. Make
    4. Make install

Add PHP's Memcache extension

    1. Yum Install Php-pecl-memcache
    2. Yum Install Zlib-devel
    3. PECL Install Memcache

Add "extension=memcache.so" to the PHP configuration file

Start the memcached service

    1. Memcached-d-M 512-l 127.0.0.1-p 11211-u Root

Report:

Memcached-d-M 10-u root-l 192.168.40.4-p 12000-c 256-p/tmp/memcached.pid (full boot)
Memcached-d-M 1024-u root-p 55001-c 2048 (default boot)


Parameter description:
The-D option is to start a daemon
-M is the amount of memory allocated to Memcache, in megabytes, I'm 10MB.
-U is the user running memcache, I am root here
-L is the server IP address of the listener
-P is the port that sets Memcache listening, preferably a port above 1024
The-c option is the maximum number of concurrent connections to run, which is 1024 by default and is set according to the load on your server
-P is a PID file that is set to save Memcache
-VV Debug Mode

RELATED Links: http://blog.csdn.net/php_boy/article/details/6880488

http://koda.iteye.com/blog/665761

Http://www.linuxidc.com/Linux/2011-09/43033.htm

http://my.oschina.net/ruiorz/blog/280165

Linux memcache extension method for installing PHP

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.