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.

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:
    8
    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:
    588
    Likes Received:
    88
    Trophy Points:
    153
    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.
     
    Del Drago likes this.
  3. Del Drago

    Del Drago Member

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

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page