Jump to content

someone can help me to best configure my cpanel?


Recommended Posts

ok, I've enabled both, and now - in acp - I've try to set storage as mysql + memcached (no info for opcache), but I cannot continue cause server ip/port.

from default is present 127.0.0.1:(high port, how I don't remember) but seems to not work.

Link to comment
Share on other sites

Use my recommendation with caution as i have many years to use cpanel !

Use the below commands from ssh:

Check if libevent is installed:

whereis libevent

If it's not there/installed run:

yum install libevent


Then install memcached:


 

yum install memcached

Or do it from source:

 

wget http://www.memcached.org/files/memcached-1.4.24.tar.gz
tar xfz memcached-1.4.24.tar.gz
cd memcached-1.4.24
./configure
make
make install

 

Run Memcached as a daemon (d = daemon, m = memory, u = user, l = IP to listen to, p = port)

memcached -d -m 1024 -u root -l 127.0.0.1 -p 11211

Then install php memcache:

wget https://pecl.php.net/get/memcache-3.0.8.tgz
tar zxvf memcache-3.0.8.tgz
cd memcache-3.0.8
phpize
./configure
make
make install

Then add it in php.ini :

vi /usr/local/lib/php.ini

Find the extension as below and if it is not existed, add it in the php.ini.

extension=memcache.so

Restart the Apache services.

service httpd restart

Memcache port is: 11211

Link to comment
Share on other sites

Thank'u for this great post, but im on a shared/cloudlinux hosting. So, i think i cannot make none of this, sorry :/

-

But i've libevent in my list, and also memcache.

-

I've already installed memcacheD. Is necessary to install also memcached? And whatis libevent? :p

 

-

I've enabled libevent (it required socket). But for memcache? i need to enable if i have also memcached?

Link to comment
Share on other sites

Just ask your provider if they have install Memcache and if they have then you are ready to go :)

libevent is a needed library....

Just check on your list the libevent and memcache and you are fine if the provider has already install the Memcache...

 

Link to comment
Share on other sites

I've found other info in www: http://blackbe.lt/php-memcache-vs-memcached/

+ https://code.google.com/p/memcached/wiki/PHPClientComparison

So, seems to be two separate and totally differents clients. one or other... Both isn't useful.

Atm i use memcached (seems to be the newest and more supported) and all seems to work fine :)

 

Thanks for support and time!

Link to comment
Share on other sites

memcache

This extension allows you to work with memcached through handy OO and procedural interfaces.

 

memcached

This extension uses libmemcached library to provide API for communicating with memcached servers.

I don't think there's really a difference between the two. Two extensions, one purpose.

Link to comment
Share on other sites

ok, but if i have memcached isn't useful, in my opinion, to install also memcache.

otherwise if i install memcache + memcached i use memcache instead of memcached. so, memcached will be unused.

-

if memcached is best than memcache, is best to install only memcached (+ opcache) and goodbye memcache :D

-

again, thanks for your time :)

Link to comment
Share on other sites

On 10/2/2015, 12:40:05, ASTRAPI said:

Use my recommendation with caution as i have many years to use cpanel !

ASTRAPI,

Thank you very much. I had to do "/sbin/chkconfig memcached on" as a step, but your instructions worked great and is running for my forum and adserver (Revive Adserver). Before this, I thought I'd never get Memcached and Memcache running on my server. Thanks again. :thumbsup:

Link to comment
Share on other sites

Hi,

I have gone through the post and applied the steps. Then I realised memcache is already running as ;

nobody    1178     1  0 Jan13 ?        00:03:34 /usr/local/bin/memcached -u nobody -d -m 64 -l 127.0.0.3 -p 11211

I have set the configuration of IPS4 as memcached ( targeting the above deamon as 127.0.0.3:11211 ) and MySQL but the site ( a test site ) responses much slower than filestorage without memcache..

Any idea ?

Link to comment
Share on other sites

I think there is a problem with memcached installation. When I run make get the following error

make[2]: Entering directory `/root/memcached-1.4.24'
gcc -std=gnu99 -DHAVE_CONFIG_H -I.    -fprofile-arcs -ftest-coverage -g -O2 -pthread -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT memcached_debug-items.o -MD -MP -MF .deps/memcached_debug-items.Tpo -c -o memcached_debug-items.o `test -f 'items.c' || echo './'`items.c
cc1: warnings being treated as errors
items.c: In function ‘crawler_crawl_q’:
items.c:1141: warning: comparison is always true due to limited range of data type
make[2]: *** [memcached_debug-items.o] Error 1
make[2]: Leaving directory `/root/memcached-1.4.24'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/root/memcached-1.4.24'
make: *** [install] Error 2


Any idea how to fix this ?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...