The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to use memcached as much as possible on WHM server

Discussion in 'Workarounds and Optimization' started by postcd, May 1, 2014.

  1. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    620
    Likes Received:
    6
    Trophy Points:
    18
    Hello,

    i installed memcached on my WHM centos server according to this tutorial and so i believe its enabled properly, i see it in phpinfo.

    Now i want to ask how i can now enable memcache everywhere for all php scripts, because i have bunch of free ram and CPU is overloaded.

    thx for ideas
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Most of the installation instructions are covered in your thread from 2012:

    Memcached Installation

    I'm not sure of your exact question here. Are you expecting it to function like Mod_Rewrite where you enable rules in the .htaccess file, or do you have additional questions? Please clarify.

    Thank you.
     
  3. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    620
    Likes Received:
    6
    Trophy Points:
    18
    thx, so from the information in topic you linked, it means, that currently when i used EasyApache to enable memcache/d? it is automatically applied to all websites globally? So any php script uses it? thx
    PS: in my case same questions applies to eAccelerator (i enabled thru EasyApache too), can u advice pls?
     
    #3 postcd, May 3, 2014
    Last edited: May 3, 2014
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    More information about this Apache module is available here:

    Apache Module: MemCache

    Please ensure you read that full document to understand how it functions and what's compatible with it. Assuming you are using Apache 2.2, please also read:

    Apache Mod_Mem_Cache

    Here is a sample configuration from the Mod_Cache documentation you could use under "Pre Main Include" in "WHM Home » Service Configuration » Apache Configuration » Include Editor" to utilize the module for your accounts:

    Code:
    <IfModule mod_disk_cache.c>
    CacheRoot c:/cacheroot
    CacheEnable disk /
    CacheDirLevels 5
    CacheDirLength 3
    </IfModule> 
    Naturally, this is just a sample configuration, so you would have to modify it for your own system. Please ensure you open a separate thread for any questions about eAccelerator.

    Thank you.
     
  5. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    620
    Likes Received:
    6
    Trophy Points:
    18
    Why should i use this disk cache? I asked about global usage of eaccelerator and memcached.
    Moreower wordpress sites i host already have disk cache option so i dont know what this should do
     
  6. luigidelgado

    luigidelgado Well-Known Member

    Joined:
    Nov 6, 2010
    Messages:
    109
    Likes Received:
    2
    Trophy Points:
    16
    Location:
    Mexico
    cPanel Access Level:
    Root Administrator
    Twitter:
    Found here crybit.com/easy-way-to-install-memcached-and-memcache-in-a-cpanel-server/ the easiest way to install memcache/memcached. Hope it helps.
     
Loading...

Share This Page