Steps for installing memcache extension in php

Source: Internet
Author: User


Environment:

System: CentOS 6.4 x86_64
PHP version: php5.3.28

I. File download

1. memcache

Memcache website: http://pecl.php.net/package/memcache
Memcache Download: http://down.shshenchu.com/memcache-3.0.8.tgz

II. Installation and configuration

1. Download and install memcache

[Root @ server101 ~] # Cd/usr/local/src // enter the Directory
[Root @ server101 src] # wget http://down.shshenchu.com/memcache-3.0.8.tgz // download the file
[Root @ server101 src] # tar-zxvf memcache-3.0.8.tgz // decompress the file
[Root @ server101 src] # cd memcache-3.0.8 // enter the file directory
[Root @ server101 memcache-3.0.8] #/usr/local/php/bin/phpize // Generate configure file
[Root @ server101 memcache-3.0.8] #./configure -- with-php-config =/usr/local/php/bin/php-config // Generate makefile File
[Root @ server101 memcache-3.0.8] # make-j2 & make install // compile and install

2. Configure the php. Ini file

1) add memcache. so extension
// Add the following content at the end of the php. Ini file

[Memcache]
Extension = memcache. so

2) modify the session configuration

// Modify the parameters as follows:

Session. save_handler = memcache
Session. save_path = "tcp: // 192.168.4.106: 12000"

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.