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 auto start

Discussion in 'EasyApache' started by faca5, Sep 18, 2018.

  1. faca5

    faca5 Registered

    Joined:
    Nov 25, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    51
    Hello.

    Do you have any idea how to make memcache/d auto start if fail to work?!

    I found these instructions.

    It doesnt work very well on UDP port.


    CentOS 5 and 6

    /etc/chkserv.d/memcached

    service[memcached]=11211,version,VERSION,/etc/init.d/memcached restart,memcached,memcached


    /scripts/restartsrv_memcached
    #!/bin/bash
    /etc/init.d/memcached restart

    chmod +x /scripts/restartsrv_memcached




    CentOS 7

    /etc/chkserv.d/memcached
    service[memcached]=11211,version,VERSION,/bin/systemctl restart memcached,memcached,memcached


    /scripts/restartsrv_memcached
    #!/bin/bash
    /bin/systemctl restart memcached

    chmod +x /scripts/restartsrv_memcached



    Enable
    WHM > Service Manager > Memcached
    /etc/chkserv.d/chkservd.conf
     
  2. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,469
    Likes Received:
    505
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hello @faca5

    Where did you get those instructions? Those appear to be instructions on how to add it to chkservd. If executed properly they should work

    Can you take a look at the thread and the ones linked within it here: Installing memcache and memcached with EasyApache4
    How to install Memcached in EA4 and PHP72

    And let me know if these help with the issue. The following works to start/restart though I had to add it as follows:

    Code:
    systemctl enable memcached.service
    Created symlink from /etc/systemd/system/multi-user.target.wants/memcached.service to /usr/lib/systemd/system/memcached.service.
    Code:
    # systemctl start memcached.service
    # systemctl status memcached.service
    ● memcached.service - Memcached
       Loaded: loaded (/usr/lib/systemd/system/memcached.service; enabled; vendor preset: disabled)
       Active: active (running) since Tue 2018-09-18 11:35:31 CDT; 1s ago
     Main PID: 28208 (memcached)
       CGroup: /system.slice/memcached.service
               └─28208 /usr/bin/memcached -u memcached -p 11211 -m 64 -c 1024 -l 127.0.0.1,::1
    

    Create this file:
    Code:
    /etc/chkserv.d/memcached
    Which has the contents as follows
    Code:
    service[memcached]=11211,version,VERSION,/bin/systemctl restart memcached,memcached,memcached
    
    
    Create this file:
    Code:
    /scripts/restartsrv_memcached
    Which has the contents as follows:
    Code:
    /bin/systemctl restart memcached
    Then run:
    Code:
    chmod +x /scripts/restartsrv_memcached
    
    This makes
     
    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