Install memcache extension in CentOS PHP

Source: Internet
Author: User
Tags zts
The first thing to note is the difference between memcache and memcached. memcache is a client extension and memcached is a server. 1. install the libmemcached Library [root @ bl

The first thing to note is the difference between memcache and memcached. memcache is a client extension and memcached is a server.

1. install the libmemcached Library

 
  [Root@blog.phpha.com] yum install libmemcached

2. install Memcache extension in PHP

 
  [Root@blog.phpha.com] wget-c http://pecl.php.net/get/memcache-3.0.8.tgz?root@blog.phpha.com] tar-zxvf memcache-3.0.8.tgz [root@blog.phpha.com] cd memcache-3.0.8 [root@blog.phpha.com]/usr/local/php/bin/phpize [root@blog.phpha.com] /configure -- with-php-config =/usr/local/php/bin/php-config -- enable-memcache -- with-zlib-dir [root@blog.phpha.com] make & make install/ usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/memcache. also [root@blog.phpha.com] vim/usr/local/php/etc/php. iniextension =/usr/local/php/lib/php/extension/ no-debug-non-zts-20090626/memcache. sosession. save_handler = memcachesession. save_path = "tcp: // 127.0.0.100: 11211" [root@blog.phpha.com] service php-fpm reload

Supplement: This article introduces the PHP Memcache extension installation, that is, the client installation. After the installation, a problem is found, and the SESSION is lost. when the Memcached server is installed, no port 11211 is added to the firewall. after the firewall rules are modified, everything is normal.

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.