CWP - Help to install Memcached
-
Hi,
My CWP webserver is Nginx & Varnish & Apache with NGINX as a main server and forced to use PHP-FPM
Please help me to install and activate Memcached.
I also followed your guide but it doesn't work (on my PHP info not have Memcached):
I also have installed php-pecl-memcache and libevent and libevent-devel and php73-php-pecl-memcached.x86_64 it's correct ?
Please help me, thank you.
-
I have resolved !
-
glad to know it is resolved.
here is the procedure :
First install libmemcached
cd /usr/local/src 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 make && make install
then install memcached from pecl
cd /usr/local/src rm -rf memcached* curl https://pecl.php.net/get/memcached -o memcached.tgz tar -xf memcached.tgz cd memcached-* /opt/alt/php-fpm73/usr/bin/phpize ./configure --with-php-config=/opt/alt/php-fpm73/usr/bin/php-config make && make install
ensure you've
memcached.ini
created withextension=memcached.so
here /opt/alt/php-fpm73/usr/php/php.d/ - run the command to create memcached.ini :grep "memcached.so" /opt/alt/php-fpm73/usr/php/php.d/memcached.ini 2> /dev/null 1> /dev/null|| echo "extension=memcached.so" > /opt/alt/php-fpm73/usr/php/php.d/memcached.ini
-
Hi, "sandeep" you are the number ONE, your solution works perfectly, thanks you !
-
-
@legend actually don't know what you're asking exactly. CWP backups sql not queries.
-
@sandeep what i mean is with memcached, data is lost when the server rebots o go offline. Is there a way for memcached to call this data from the database?
Secondly, i see memcache and memcached. Which one should I use as I installed them direclty from the cwp panel?
-
@legend well memcache uses in memory object caching there is nothing to do with db, it will get rebuilded by your supported script after reboot.
php memcached is recommended
-
@sandeep Thanks for the info.