Author Topic: how can install MemCached ? thanks  (Read 51484 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
how can install MemCached ? thanks
« on: December 28, 2014, 05:54:52 AM »
how can install MemCached ? thanks

Offline
**
Re: how can install MemCached ? thanks
« Reply #1 on: December 29, 2014, 12:17:05 PM »
yum install memcached

Offline
*
Re: how can install MemCached ? thanks
« Reply #2 on: December 30, 2014, 12:37:24 PM »
Hello,

I´m 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?

Offline
*
Re: how can install MemCached ? thanks
« Reply #3 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
AntiDDoS Protection (web + mail)
http://centos-webpanel.com/website-ddos-protection-proxy

Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp


Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Do you need Fast and FREE Support included for your CWP linux server?
http://centos-webpanel.com/noc-partner-list
Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: how can install MemCached ? thanks
« Reply #4 on: January 01, 2015, 10:07:30 PM »
I´m 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.: I´m using it with varnish, pound and apache/php hehe. :)

Offline
*
Re: how can install MemCached ? thanks
« Reply #5 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!

Offline
*
Re: how can install MemCached ? thanks
« Reply #6 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

Re: how can install MemCached ? thanks
« Reply #7 on: May 16, 2015, 06:04:26 PM »
atleast memcahce is not meant to work wit cwp.

Offline
*
Re: how can install MemCached ? thanks
« Reply #8 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

Offline
*****
Re: how can install MemCached ? thanks
« Reply #9 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
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: how can install MemCached ? thanks
« Reply #10 on: November 22, 2015, 03:51:13 PM »
This topic is interesting

Offline
*****
Re: how can install MemCached ? thanks
« Reply #11 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!
« Last Edit: December 08, 2015, 08:06:33 AM by Igor S. »
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: how can install MemCached ? thanks
« Reply #12 on: December 06, 2015, 10:22:10 AM »
Thanks, this worked for me.
In case anyone wants $10 bonus for FREE on cheap cloud VPS from Vultr:
http://www.vultr.com/?ref=6855695
-------------------------------------------------------------------------------------------------
And $10 bonus for FREE on cheap cloud VPS from Digitalocean:
https://www.digitalocean.com/?refcode=c41029801394

Offline
*
Re: how can install MemCached ? thanks
« Reply #13 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


Offline
*
Re: how can install MemCached ? thanks
« Reply #14 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.