Making sure that memcache/memcached starts on reboot
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:
and
I then launched the memcached daemon with the following command:
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!
yum install ea4-experimental
yum install ea-php56-php-memcache
yum install ea-php56-php-memcachedand
yum install ea-memcachedI then launched the memcached daemon with the following command:
memcached -d -u nobody -m 1024 127.0.0.1 -p 11211I 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!
-
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: 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:systemctl start memcached
and see:# systemctl start memcached Failed to start memcached.service: Unit not found.
then run:yum clean all yum -y install memcached systemctl start memcached systemctl enable memcached
This will ensure memcached starts up upon rebooting.0 -
Thank you, sir. That did the trick. 0 -
Hello, The "ea-memcached" package is currently only available for testing purposes. Ensure to review the 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:/usr/lib/systemd/system/memcached.service
Thank you.0
Please sign in to leave a comment.
Comments
3 comments