CentOS System to install memcached extension steps for PHP _linux

Source: Internet
Author: User
Tags install php memcached php memcached centos

1. Installation via Yum

Copy Code code as follows:

Yum-y Install memcached
#安装完成后执行:
Memcached-h
#出现memcached帮助信息说明安装成功

2. Join Start Service

Copy Code code as follows:

Chkconfig--level 2345 memcached on

3. Configure memcached

Copy Code code as follows:

Vim/etc/sysconfig/memcached
#文件中内容如下, modify as needed:
Port= "11211" #端口
user= "Root" #用户名
maxconn= "1024" #最大连接数
The "cachesize=" #内存大小
Options= "" #附加参数

4. Install libmemached

Copy Code code as follows:

wget https://launchpad.net/libmemcached/1.0/1.0.16/+download/libmemcached-1.0.16.tar.gz
TAR-ZXVF libmemcached-1.0.16.tar.gz
CD libmemcached-1.0.16
./configure-prefix=/usr/local/libmemcached-with-memcached
Make && make install

5. Install Php-devel

Copy Code code as follows:

Yum Install Php-devel

6. Install php memcached Extension

Copy Code code as follows:

wget http://pecl.php.net/get/memcached-2.1.0.tgz
TAR-ZXVF memcached-2.1.0.tgz
CD memcached-2.1.0
/usr/local/php/bin/phpize
./configure-enable-memcached-with-php-config=/usr/local/php/bin/php-config-with-zlib-dir-with-libmemcached-dir =/usr/local/libmemcached-prefix=/usr/local/phpmemcached
Make && make install

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.