Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Making sure that memcache/memcached starts on reboot

Discussion in 'EasyApache' started by Del Drago, Jul 1, 2017.

Tags:
  1. Del Drago

    Del Drago Member

    Joined:
    Mar 2, 2012
    Messages:
    12
    Likes Received:
    1
    Trophy Points:
    53
    cPanel Access Level:
    Root Administrator
    Hello,

    I recently installed memcache and memcached on my server (CENTOS 7.3 cPanel & WHM 64.0). I used the updated instructions in the first post of the following thread:

    Installing memcache and memcached with EasyApache4

    specifically:
    Code:
    yum install ea4-experimental
    yum install ea-php56-php-memcache
    yum install ea-php56-php-memcached
    and
    Code:
    yum install ea-memcached
    I then launched the memcached daemon with the following command:
    Code:
    memcached -d -u nobody -m 1024 127.0.0.1 -p 11211
    I want to ensure that, if my server reboots, both memcache and the memcached daemon restart automatically. What steps must I take to ensure that?

    Thanks!
     
  2. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    720
    Likes Received:
    123
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    There is only one daemon, 'memcached', where memcache is a PHP extension that allows you to connect to the memcached daemon, there is also a memcached PHP extension.

    The way you are starting memcached, it will not restart when you reboot the server. Run the following:

    Code:
    kill -9 $(pgrep memcached)
    systemctl start memcached
    systemctl enable memcached
    however are you sure memcached is even installed?

    ea-memcached isn't an actual package as far as I am aware.

    memcached the daemon is available by default via centos repos.

    If you run:

    Code:
    systemctl start memcached
    and see:

    Code:
    # systemctl start memcached
    Failed to start memcached.service: Unit not found.
    
    then run:

    Code:
    yum clean all
    yum -y install memcached
    systemctl start memcached
    systemctl enable memcached
    
    This will ensure memcached starts up upon rebooting.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Del Drago likes this.
  3. Del Drago

    Del Drago Member

    Joined:
    Mar 2, 2012
    Messages:
    12
    Likes Received:
    1
    Trophy Points:
    53
    cPanel Access Level:
    Root Administrator
    Thank you, sir. That did the trick.
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,423
    Likes Received:
    1,957
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    The "ea-memcached" package is currently only available for testing purposes. Ensure to review the EasyApache 4 Experimental Repo document to understand the implications of using packages intended for testing purposes.

    If you decide to use the EA4 experimental repo and would like to use the "ea-memcached" package, then you'd run the following command after enabling the EA4 Experimental Repo:

    Code:
    yum install ea-memcached
    Once it's installed, you could review the following files to see how it's configured to start on CentOS 7:

    Code:
    /usr/lib/systemd/system/memcached.service
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice