Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
install_memcached [2018/01/23 21:39]
Lisa Clarke
install_memcached [2018/02/01 14:14]
Lisa Clarke removed
Line 65: Line 65:
  
  
 +====For cPanel:====
 +
 +===PHP7.0/​7.1/​7.2===
 +
 +<​code>​yum install -y libmemcached-devel
 +
 +/​opt/​cpanel/​ea-php70/​root/​usr/​bin/​pecl install memcached
 +/​opt/​cpanel/​ea-php71/​root/​usr/​bin/​pecl install memcached
 +/​opt/​cpanel/​ea-php72/​root/​usr/​bin/​pecl install memcached</​code>​
 +
 +
 +===PHP5.6===
 +
 +<​code>​yum install -y libmemcached-devel
 +
 +/​opt/​cpanel/​ea-php56/​root/​usr/​bin/​pecl install memcached-2.2.0</​code>​
 +
 +
 +===Troubleshooting:​===
 +
 +If installation returns error messages:
 +
 +<​code>​checking for libmemcached location... configure: error: memcached support requires libmemcached. Use --with-libmemcached-dir=<​DIR>​ to specify the prefix where libmemcached headers and library are located
 +ERROR: `/​root/​tmp/​pear/​memcached/​configure --with-php-config=/​opt/​cpanel/​ea-php71/​root/​usr/​bin/​php-config --with-libmemcached-dir=no'​ failed</​code>​
 +
 +Please install libmemcached and the memcached extension by compiling from source code  (replace php71 with your php version):
 +
 +<​code>​wget https://​launchpad.net/​libmemcached/​1.0/​1.0.18/​+download/​libmemcached-1.0.18.tar.gz
 +tar zxvf libmemcached-1.0.18.tar.gz
 +cd libmemcached-1.0.18
 +./configure --prefix=/​usr/​local/​libmemcached
 +# if above failed with error related to SASL , please run "yum install cyrus-sasl*"​ and run: (without #)
 +# ./configure --prefix=/​usr/​local/​libmemcached ​ --enable-sasl
 +make
 +make install
 +
 +wget http://​pecl.php.net/​get/​memcached-3.0.4.tgz
 +tar zxvf memcached-3.0.4.tgz
 +cd memcached-3.0.4
 +/​opt/​cpanel/​ea-php71/​root/​usr/​bin/​phpize
 +./configure --with-php-config=/​opt/​cpanel/​ea-php71/​root/​usr/​bin/​php-config --with-libmemcached-dir=/​usr/​local/​libmemcached --disable-memcached-sasl
 +# if above failed with error related to SASL , please run "yum install cyrus-sasl*"​ and run: (without #)
 +# ./configure --with-php-config=/​opt/​cpanel/​ea-php71/​root/​usr/​bin/​php-config --with-libmemcached-dir=/​usr/​local/​libmemcached --enable-memcached-sasl
 +make
 +make install
 +echo "​memcached.so"​ > /​opt/​cpanel/​ea-php71/​root/​etc/​php.ini</​code>​
 +
 +If you have further issues installing the extension on cPanel, please contact [[https://​cpanel.com/​support/​|cPanel support]].
 =====Verify:​===== =====Verify:​=====
  
  • Admin
  • Last modified: 2018/02/01 14:38
  • by Michael Alegre