Skip to main content

Installing memcached with CentOS 7 (EasyApache4)

Comments

1 comment

  • Nirjonadda
    Installing PECL Memcache on a CentOS 7 with PHP 7.1
    # wget https://github.com/websupport-sk/pecl-memcache/archive/NON_BLOCKING_IO_php7.zip

    # unzip NON_BLOCKING_IO_php7.zip
    Move pecl-memcache-NON_BLOCKING_IO_php7 to pecl-memcache_php71
    # mv pecl-memcache-NON_BLOCKING_IO_php7 pecl-memcache_php71
    Go to the given directory /pecl-memcache_php71
    # cd pecl-memcache_php71
    You can run following commands to install PECL Memcache.
    # /opt/cpanel/ea-php71/root/usr/bin/phpize && ./configure --enable-memcache --with-php-config=/opt/cpanel/ea-php71/root/usr/bin/php-config && make

    # cp modules/memcache.so /opt/cpanel/ea-php71/root/usr/lib64/php/modules/
    Add to your php.ini file to add: extension=memcached.so OR run following commands
    # echo 'extension=memcache.so' >/opt/cpanel/ea-php71/root/etc/php.d/memcached.ini

    # service httpd restart
    You can confirm both the memcache and memcached extensions are installed.
    # php -m |grep mem
    0

Please sign in to leave a comment.