Jump to content

someone can help me to best configure my cpanel?

Featured Replies

Posted

from screen... i use essentially for ipb4!

(I need to remove or add something? ...) :)

asd.png

Install memcached, and enable mysql storage using memcached cache in the advanced configuration in IPS.

Enable opcache

That should be about it.

 

 

  • Author

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.

  • Author

ok, fixed... thanks :)

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

  • Author

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?

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...

 

  • Author

as u can see in image, i can enable both.

but my questionis: is necessary to enable memcached and memcache?

atm i've:

memcached; opcache; libevent (i don't know it utility, but ok! and socket - dependency of libevent).

Memcache module provides handy procedural and object oriented interface to memcached, highly effective caching daemon, which was especially designed to decrease database load in dynamic web applications.

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.

  • Author

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 :)

Enable mysqli - much safer than the deprecated mysql.

  • Author

mysqli is already enabled. i can disable mysql?

I believe there is an option somewhere in IPS to switch from mysql to mysqli, not 100%

Don't need to disable it, just better if it never gets used

  • Author

ops... :D

i've try just now to disable mysql (and maintain only mysqli). no edit in config not other, and all seems to work fine :D

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:

No problem enjoy :)

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 ?

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 ?

Archived

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

Recently Browsing 0

  • No registered users viewing this page.