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

0 Members and 1 Guest are viewing this topic.

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

Offline
*
Re: how can install MemCached ? thanks
« Reply #16 on: December 29, 2016, 10:31:58 PM »
Hi again,


Hope to help someone.

Merhaba,

Bu zamana kadar yaptıgınız memcached ile alakali degisiklikleri sunucudan kaldirin.

Code: [Select]
[root@src-ct ~]# yum install memcached
Bu komut ile memcached yuklenecektir, eger modul eksikligi nedeniyle hata verirse bu komudu kullanin

Code: [Select]
[root@src-ct ~]# yum install libevent-devel
daha sonra yeniden bu komuda geciniz

Code: [Select]
[root@src-ct ~]# yum install memcached
Yukleme isleminden sonra test ediniz.

Code: [Select]
[root@src-ct ~]# yum list installed | grep -i memcached
yukaridaki komut sonrasi asagidaki sonuca benzer yanit alacasiniz

Code: [Select]
libmemcached10.x86_64 1.0.16-1.ius.el6 @webtatic
libmemcached10-devel.x86_64
memcached.x86_64 1.4.4-3.el6 @base

Eger buraya kadar hatasiz geldiyseniz\ memcached durumunu ogrenecegiz.

Code: [Select]
[root@src-ct ~]# /etc/init.d/memcached status
memcached (pid 1846) is running...

memcached baslatma vakti geldi demektir.

Code: [Select]
[root@src-ct ~]# /etc/init.d/memcached start
memcached (pid 1846) is started...

ve son olarak baglanti noktalarini kontrol edelim

Code: [Select]
[root@src-ct ~]# netstat -nlp| grep -i memcached
tcp 0 0 127.0.0.1:11211 0.0.0.0:* LISTEN 1846/memcached
udp 0 0 127.0.0.1:11211 0.0.0.0:* 1846/memcached

Eger sorunuz olursa bana bildirin lutfen\ iyi calismalar

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

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

Offline
*****
Re: how can install MemCached ? thanks
« Reply #19 on: September 06, 2018, 02:48:17 PM »
you can install directly from php switcher