A
A
Anton2021-10-13 15:22:43
linux
Anton, 2021-10-13 15:22:43

How to run memcached installed from source as a service?

Installed memcached from source on Oracle Linux 6. I can successfully run it with the memcached command. But how to configure it to run as a service? So that the daemon is constantly in operation, and starts after the system is rebooted.

The documentation refers to a collection of init scripts . It is not clear which and how to use.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
paran0id, 2021-10-13
@paran0id

Take the memcached.service file from there, put it in /etc/systemd/system/
If necessary, correct the paths and so on in it.
Next (as root or sudo):

systemctl daemon-reload
systemctl enable memcached
systemctl start memcached

and check that it started up
systemctl status memcached
UPD: I didn’t notice that version 6
then put memcached-init in /etc/init.d/memcached
do
chmod +x /etc/init.d/memcached
chkconfig --add memcached
chkconfig --level 3 memcached on
/etc/init.d/memcached start

status is not there, so we check manually

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question