Control Web Panel

WebPanel => Installation => Topic started by: eddyngan on December 28, 2014, 05:54:52 AM

Title: how can install MemCached ? thanks
Post by: eddyngan on December 28, 2014, 05:54:52 AM
how can install MemCached ? thanks
Title: Re: how can install MemCached ? thanks
Post by: Glenn on December 29, 2014, 12:17:05 PM
yum install memcached
Title: Re: how can install MemCached ? thanks
Post by: Qefx on December 30, 2014, 12:37:24 PM
Hello,

Im trying to find out too how to install memcache/d . Memcached itself is no problem. But how do I get it into PHP? I guess I need to recompile. --with-memcache or memcached option? But where do I need to put the files needed for recompile?
Title: Re: how can install MemCached ? thanks
Post by: Administrator on January 01, 2015, 03:14:36 PM
this will not work wit suphp, you have varnish which is the best caching server integrated into CWP
Title: Re: how can install MemCached ? thanks
Post by: Qefx on January 01, 2015, 10:07:30 PM
Im using WP-FFPC with memcache and wp-object cache for wordpress, turned down my logged in user network time by one second :) I compiled it my self and added it as an .so link to php.

But this product is amazing nonetheless

PS.: Im using it with varnish, pound and apache/php hehe. :)
Title: Re: how can install MemCached ? thanks
Post by: timworx on January 16, 2015, 03:33:42 PM
Qefc - what exactly do you mean by it "turned down my logged in user network time by one second"?

Does this mean it has sped up your response/load time for WP sites? I would definitely be interested in what you did if that's the case!
Title: Re: how can install MemCached ? thanks
Post by: matus on May 15, 2015, 03:51:37 PM
If you need it, do the following wich works perfectly on my CentOS Server with cwp.

Quote
yum install memcached libevent libevent-devel nc -y
cd /usr/src/
wget http://pecl.php.net/get/memcached-2.2.0.tgz
tar -zxvf memcached-2.2.0.tgz
cd memcached-2.2.0/
phpize
./configure
make && make install

open /usr/local/php/php.ini and add: "extension=/usr/src/memcached-2.2.0/modules/memcached.so"
service httpd reload
Title: Re: how can install MemCached ? thanks
Post by: brijendrasial on May 16, 2015, 06:04:26 PM
atleast memcahce is not meant to work wit cwp.
Title: Re: how can install MemCached ? thanks
Post by: danrimer on July 29, 2015, 09:05:18 AM
Hello

Mine fails at the ./configure stage
error is:
Code: [Select]
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
I'm a noob at this, so any help appreciated!


all the best

Dan
Title: Re: how can install MemCached ? thanks
Post by: Igor S. on November 05, 2015, 10:21:49 AM
Hello

Mine fails at the ./configure stage
error is:
Code: [Select]
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
I'm a noob at this, so any help appreciated!


all the best

Dan


Hi,

try to comile it with the option: --with-libmemcached-dir or --with-libmemcached-dir=/usr
Title: Re: how can install MemCached ? thanks
Post by: JeffreyJes on November 22, 2015, 03:51:13 PM
This topic is interesting
Title: Re: how can install MemCached ? thanks
Post by: Igor S. on November 24, 2015, 12:50:19 PM
Hello everybody.

Who want to install php pecl memcached with the CWP should use old libmemcached.
See below for instruction:

1. Install Webtatic repo and libmemcached:
Code: [Select]
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
yum install libmemcached10-devel
2. Get and unpack pecl memcached

Code: [Select]
cd /usr/local/src
pecl download memcached
tar -xf memcached-{downloaded_version}.tgz

3. Compile it
Code: [Select]
cd memcached-{downloaded_version}/
/usr/local/bin/phpize
./configure
make

4. Install it
Code: [Select]
mkdir -p `php -c date.timezone=utc -i |grep -i no-debug-non |awk '{print $3}'`
cp modules/memcached.so  `php -c date.timezone=utc -i |grep -i no-debug-non |awk '{print $3}'`
echo "extension=memcached.so" >> /usr/local/php/php.ini
/etc/init.d/httpd restart

5. Enjoy!
Title: Re: how can install MemCached ? thanks
Post by: aicon on December 06, 2015, 10:22:10 AM
Thanks, this worked for me.
Title: Re: how can install MemCached ? thanks
Post by: ozgur on December 22, 2016, 06:57:46 PM
Hello everybody.

Who want to install php pecl memcached with the CWP should use old libmemcached.
See below for instruction:

1. Install Webtatic repo and libmemcached:
Code: [Select]
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
yum install libmemcached10-devel
2. Get and unpack pecl memcached

Code: [Select]
cd /usr/local/src
pecl download memcached
tar -xf memcached-{downloaded_version}.tgz

3. Compile it
Code: [Select]
cd memcached-{downloaded_version}/
/usr/local/bin/phpize
./configure
make

4. Install it
Code: [Select]
mkdir -p `php -c date.timezone=utc -i |grep -i no-debug-non |awk '{print $3}'`
cp modules/memcached.so  `php -c date.timezone=utc -i |grep -i no-debug-non |awk '{print $3}'`
echo "extension=memcached.so" >> /usr/local/php/php.ini
/etc/init.d/httpd restart

5. Enjoy!

Hi, I followed these steps, and it worked for me.

However, I couldn't find editing cache size of memcached system.
I only found this file /usr/local/src/memcached-2.2.0/memcached.ini but no option for cache limit.
When I print Memcached::getStats() method in PHP file, I see [limit_maxbytes] => 536870912 (512 MB)

Nevertheless I couldn't find right command for restarting memcached.

I use Centos 6.7 and CWP.
Does anyone know solution for these?
Thanks

Title: Re: how can install MemCached ? thanks
Post by: ozgur on December 24, 2016, 12:23:22 AM
Hi again,

I misconfigured first, but then I found solutions for my problems via mixing method.

I followed these steps:
Code: [Select]
1. Install Webtatic repo and libmemcached:
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
yum install libmemcached10-devel
2. Install memcached libevent and compile it
yum install memcached libevent libevent-devel nc -y
cd /usr/src/
wget http://pecl.php.net/get/memcached-2.2.0.tgz
tar -zxvf memcached-2.2.0.tgz
cd memcached-2.2.0/
phpize
./configure
(if command does not work, try with this: "./configure --with-libmemcached-dir")
make && make install
3. open /usr/local/php/php.ini and add to the bottom: "extension=/usr/src/memcached-2.2.0/modules/memcached.so" without quotation marks
service httpd reload
4. Configure memcached
vi /etc/sysconfig/memcached
5. Restart memcached
/etc/init.d/memcached restart

We can configure memcached settings as:
Code: [Select]
vi /etc/sysconfig/memcached

PORT="11211"
USER="memcached"
# max connection 1024
MAXCONN="1024"
# set ram size to 512 MB
CACHESIZE="512"
# listen to loopback ip 127.0.0.1, for network connection use real ip e.g., 10.0.0.4
OPTIONS="-l 127.0.0.1"

Moreover, If we need to increase timeout from 65535 seconds to almost 1 year (because, we can get this error while writing: "udf_flags will be limited to 65535") to store data in memcached, I edited and recomplied c code like this:
Code: [Select]
vi /usr/src/memcached-2.2.0/php_memcached.c
change this line (16 means 2^16 seconds):
"#define MEMC_VAL_USER_FLAGS_MAX ((1 << 16) - 1)"
with this line (25 means 2^25 seconds):
"#define MEMC_VAL_USER_FLAGS_MAX ((1 << 25) - 1)"
and turn phpize step and continue again.

Hope to help someone.
Title: Re: how can install MemCached ? thanks
Post by: vpulshah on June 22, 2018, 12:16:01 PM
Hello,

I m new to this CWP Pro.

I installed it and using Varnish cache with PHP 7.2

I m getting every 1hr memcached email

Time:         Wed Jun 20 23:00:23 2018 -0500
Account:      memcached
Resource:     Process Time
Exceeded:     1356295 > 1800 (seconds)

Can you members please guide me what to do for this and why this is coming.

I need to run PHP websites and Wordpress websites hosting on this.

Thanks,
VPul.
Title: Re: how can install MemCached ? thanks
Post by: Patrickgan on September 06, 2018, 06:02:47 AM
If you need it, do the following wich works perfectly on my CentOS Server with cwp.

Quote
yum install memcached libevent libevent-devel nc -y
cd /usr/src/
wget http://pecl.php.net/get/memcached-2.2.0.tgz
tar -zxvf memcached-2.2.0.tgz
cd memcached-2.2.0/
phpize
./configure
make && make install

open /usr/local/php/php.ini and add: "extension=/usr/src/memcached-2.2.0/modules/memcached.so"
service httpd reload
Thank you for sharing this key information as it was really helpful.
Title: Re: how can install MemCached ? thanks
Post by: Sandeep on September 06, 2018, 02:48:17 PM
you can install directly from php switcher
Title: Re: how can install MemCached ? thanks
Post by: Automata on November 07, 2019, 03:20:53 AM
PROBLEM SOLVED

Hi, i discovered a great website https://www.mysterydata.com/ with a great administrator where you can find many guides for CWP and more, also by registering for free on the forum i found the solution to this problem thanks to the courtesy and extreme availability of the administrator.

SOLUTION:

https://forum.mysterydata.com/topic/4/cwp-help-to-install-memcached

Good day and good work to all !