Centos7 Installing memcached Extensions

Source: Internet
Author: User
Tags memcached php server zts git clone

1, install memcached

Yum-y Install memcached
/usr/bin/memcached-b-L 127.0.0.1-p 11211-m 150-u Root
To see if memcached is running:
[root@localhost /]# ps -ef | grep memcached//或[root@localhost /]# pstree -p | grep memcached

If you can see that there is a memcached process, it means that our memcached server has been successfully installed.

2, install libmemached

The installation directory is/usr/local/

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

3. Download the Memcache expansion pack and install

The installation directory is/usr/local/

git clone git://github.com/php-memcached-dev/php-memcached.gitcd php-memcached/#安装扩展/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/php-memcached--disable-memcached-saslmake-j4make Install

After installation, you will be prompted to expand the directory:/usr/local/php/lib/php/extensions/no-debug-zts-20151012/
Edit php.ini:

Extension=/usr/local/php/lib/php/extensions/no-debug-zts-20151012/memcached.so

Put it in the last row, restart the PHP server (called by the component, restart the next Web service)
Re-view Phpinfo:

Centos7 Installing memcached Extensions

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.