Hello Everyone!
PHP extensions for Memcache and Memcached are now available in the EasyApache 4 Experimental Repository. Here's the latest comment regarding this change from the memcached-in-easyapache4 feature request:
Replace "php56" with the version of PHP you want to install the extensions on (e.g. php54, php55, php70).
To installed the Memcached daemon, run this command:
Let us know if you have any questions.
Thanks!
Note: The previous workaround instructions are also unsupported, but are provided below for reference:
PHP extensions for Memcache and Memcached are now available in the EasyApache 4 Experimental Repository. Here's the latest comment regarding this change from the memcached-in-easyapache4 feature request:
Once you have reviewed the instructions and warnings on the Experimental Repository document, you can choose to enable the repo and install the packages via the following commands:[email protected]
This is now available in the experimental repo of EasyApache 4. There is no SASL, and no per-user init files, which means it is not considered ready for shared environments. These RPMs are likely to remain in the experimental repo for quite a while, as we aren't likely to get back to adjust those things soon, but I figured I'd share these here anyway.
Code:
yum install ea4-experimental
yum install ea-php56-php-memcache
yum install ea-php56-php-memcached
To installed the Memcached daemon, run this command:
Code:
yum install ea-memcached
Thanks!
Note: The previous workaround instructions are also unsupported, but are provided below for reference:
The following thread is intended to offer step-by-step instructions to administrators that would like to install the Memcached and Memcache PECL modules on EasyApache 4. I encourage anyone reviewing this thread to vote and add feedback to the following feature request if you'd like to see these options made available as native PHP options in EasyApache 4:
MemcacheD in EasyApache4
To start, here's some background information about the packages installed with these instructions:
To begin the installation, first install cyrus-sasl-devel and lib-memcached using the following commands:
Next, install the Memcached Pecl Module for each version of PHP active on your system.
Note: Please see the post here if you are receiving popen() has been disabled for security reasons errors.
Then, install the Memcache PECL module for each version of PHP active on your system.
Note: Please see the post here if you are receiving popen() has been disabled for security reasons errors.
Finally, verify each version of PHP active on your system includes the Memcached and Memcache modules:
Here's an example of the output you should see:
Let us know if you have any questions about these instructions.
Thank you.
MemcacheD in EasyApache4
To start, here's some background information about the packages installed with these instructions:
libmemcached is an open source C/C++ client library and tools for the memcached server (memcached - a distributed memory object caching system). It has been designed to be light on memory usage, thread safe, and provide full access to server side methods.
The PECL memcached package is an extension that uses the libmemcached library to provide API for communicating with memcached servers.
The PECL memcache package is an extension allows you to work with memcached through handy OO and procedural interfaces.
This guide does not cover installing the Memcached daemon.
The PECL memcached package is an extension that uses the libmemcached library to provide API for communicating with memcached servers.
The PECL memcache package is an extension allows you to work with memcached through handy OO and procedural interfaces.
This guide does not cover installing the Memcached daemon.
To begin the installation, first install cyrus-sasl-devel and lib-memcached using the following commands:
Code:
yum install cyrus-sasl-devel
mkdir /root/lib-memcached-install
cd /root/lib-memcached-install
wget https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz
tar -xvzf libmemcached-1.0.18.tar.gz
cd libmemcached-1.0.18
./configure
make && make install
Next, install the Memcached Pecl Module for each version of PHP active on your system.
Note: Please see the post here if you are receiving popen() has been disabled for security reasons errors.
Code:
mkdir /root/memcached-php54-pecl
cd /root/memcached-php54-pecl
/opt/cpanel/ea-php54/root/usr/bin/pecl download https://pecl.php.net/get/memcached-2.2.0.tgz
tar -xvf memcached-2.2.0.tgz
cd memcached-2.2.0
/opt/cpanel/ea-php54/root/usr/bin/phpize
./configure --with-php-config=/opt/cpanel/ea-php54/root/usr/bin/php-config
make && make install
echo 'extension=memcached.so' >> /opt/cpanel/ea-php54/root/etc/php.d/memcached.ini
Code:
mkdir /root/memcached-php55-pecl
cd /root/memcached-php55-pecl
/opt/cpanel/ea-php55/root/usr/bin/pecl download https://pecl.php.net/get/memcached-2.2.0.tgz
tar -xvf memcached-2.2.0.tgz
cd memcached-2.2.0
/opt/cpanel/ea-php55/root/usr/bin/phpize
./configure --with-php-config=/opt/cpanel/ea-php55/root/usr/bin/php-config
make && make install
echo 'extension=memcached.so' >> /opt/cpanel/ea-php55/root/etc/php.d/memcached.ini
Code:
mkdir /root/memcached-php56-pecl
cd /root/memcached-php56-pecl
/opt/cpanel/ea-php56/root/usr/bin/pecl download https://pecl.php.net/get/memcached-2.2.0.tgz
tar -xvf memcached-2.2.0.tgz
cd memcached-2.2.0
/opt/cpanel/ea-php56/root/usr/bin/phpize
./configure --with-php-config=/opt/cpanel/ea-php56/root/usr/bin/php-config
make && make install
echo 'extension=memcached.so' >> /opt/cpanel/ea-php56/root/etc/php.d/memcached.ini
Code:
mkdir /root/memcached-php70-pecl
cd /root/memcached-php70-pecl
/opt/cpanel/ea-php70/root/usr/bin/pecl download memcached
tar -xvf memcached*
cd memcached*
/opt/cpanel/ea-php70/root/usr/bin/phpize
./configure --with-php-config=/opt/cpanel/ea-php70/root/usr/bin/php-config
make && make install
echo 'extension=memcached.so' >> /opt/cpanel/ea-php70/root/etc/php.d/memcached.ini
Code:
mkdir /root/memcached-php71-pecl
cd /root/memcached-php71-pecl
/opt/cpanel/ea-php71/root/usr/bin/pecl download memcached
tar -xvf memcached*
cd memcached*
/opt/cpanel/ea-php71/root/usr/bin/phpize
./configure --with-php-config=/opt/cpanel/ea-php71/root/usr/bin/php-config
make && make install
echo 'extension=memcached.so' >> /opt/cpanel/ea-php71/root/etc/php.d/memcached.ini
Code:
mkdir /root/memcached-php72-pecl
cd /root/memcached-php72-pecl
/opt/cpanel/ea-php72/root/usr/bin/pecl download memcached
tar -xvf memcached*
cd memcached*
/opt/cpanel/ea-php72/root/usr/bin/phpize
./configure --with-php-config=/opt/cpanel/ea-php72/root/usr/bin/php-config
make && make install
echo 'extension=memcached.so' >> /opt/cpanel/ea-php72/root/etc/php.d/memcached.ini
Then, install the Memcache PECL module for each version of PHP active on your system.
Note: Please see the post here if you are receiving popen() has been disabled for security reasons errors.
Code:
/opt/cpanel/ea-php54/root/usr/bin/pecl install memcache
echo 'extension=memcache.so' >> /opt/cpanel/ea-php54/root/etc/php.d/memcache.ini
Code:
/opt/cpanel/ea-php55/root/usr/bin/pecl install memcache
echo 'extension=memcache.so' >> /opt/cpanel/ea-php55/root/etc/php.d/memcache.ini
Code:
/opt/cpanel/ea-php56/root/usr/bin/pecl install memcache
echo 'extension=memcache.so' >> /opt/cpanel/ea-php56/root/etc/php.d/memcache.ini
Code:
mkdir /root/memcache-php70-pecl
cd /root/memcache-php70-pecl
wget https://github.com/websupport-sk/pecl-memcache/archive/NON_BLOCKING_IO_php7.zip
unzip NON_BLOCKING_IO_php7.zip
cd pecl-memcache-NON_BLOCKING_IO_php7
/opt/cpanel/ea-php70/root/usr/bin/phpize && ./configure --enable-memcache --with-php-config=/opt/cpanel/ea-php70/root/usr/bin/php-config && make
cp modules/memcache.so /opt/cpanel/ea-php70/root/usr/lib64/php/modules/
echo 'extension=memcache.so' >/opt/cpanel/ea-php70/root/etc/php.d/memcache.ini
Code:
mkdir /root/memcache-php71-pecl
cd /root/memcache-php71-pecl
wget https://github.com/websupport-sk/pecl-memcache/archive/NON_BLOCKING_IO_php7.zip
unzip NON_BLOCKING_IO_php7.zip
cd pecl-memcache-NON_BLOCKING_IO_php7
/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/
echo 'extension=memcache.so' >/opt/cpanel/ea-php71/root/etc/php.d/memcache.ini
Code:
mkdir /root/memcache-php72-pecl
cd /root/memcache-php72-pecl
wget https://github.com/websupport-sk/pecl-memcache/archive/NON_BLOCKING_IO_php7.zip
unzip NON_BLOCKING_IO_php7.zip
cd pecl-memcache-NON_BLOCKING_IO_php7
/opt/cpanel/ea-php72/root/usr/bin/phpize && ./configure --enable-memcache --with-php-config=/opt/cpanel/ea-php72/root/usr/bin/php-config && make
cp modules/memcache.so /opt/cpanel/ea-php72/root/usr/lib64/php/modules/
echo 'extension=memcache.so' >/opt/cpanel/ea-php72/root/etc/php.d/memcache.ini
Finally, verify each version of PHP active on your system includes the Memcached and Memcache modules:
Code:
/opt/cpanel/ea-php54/root/usr/bin/php -m |grep memcache
/opt/cpanel/ea-php55/root/usr/bin/php -m |grep memcache
/opt/cpanel/ea-php56/root/usr/bin/php -m |grep memcache
/opt/cpanel/ea-php70/root/usr/bin/php -m |grep memcache
/opt/cpanel/ea-php71/root/usr/bin/php -m |grep memcache
/opt/cpanel/ea-php72/root/usr/bin/php -m |grep memcache
Code:
# /opt/cpanel/ea-php70/root/usr/bin/php -m |grep memcache
memcache
memcached
Thank you.
Last edited by a moderator: