Unit memcached.service not found on Ubunto 20.04 when installing memcached

502 views Asked by At

I'm trying to follow these instructions on Vultr for Ubuntu 20.04 to install memcached, however when I get to the step sudo make install, the output is:

make  all-recursive
make[1]: Entering directory '/root/memcached-1.6.17'
Making all in doc
make[2]: Entering directory '/root/memcached-1.6.17/doc'
make  all-am
make[3]: Entering directory '/root/memcached-1.6.17/doc'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/root/memcached-1.6.17/doc'
make[2]: Leaving directory '/root/memcached-1.6.17/doc'
make[2]: Entering directory '/root/memcached-1.6.17'
make[2]: Leaving directory '/root/memcached-1.6.17'
make[1]: Leaving directory '/root/memcached-1.6.17'
root@plesk:~/memcached-1.6.17# ./memcached --version
memcached 1.6.17
root@plesk:~/memcached-1.6.17# sudo make install
make  install-recursive
make[1]: Entering directory '/root/memcached-1.6.17'
Making install in doc
make[2]: Entering directory '/root/memcached-1.6.17/doc'
make  install-am
make[3]: Entering directory '/root/memcached-1.6.17/doc'
make[4]: Entering directory '/root/memcached-1.6.17/doc'
make[4]: Nothing to be done for 'install-exec-am'.
 /usr/bin/mkdir -p '/usr/local/memcached/share/man/man1'
 /usr/bin/install -c -m 644 memcached.1 '/usr/local/memcached/share/man/man1'
make[4]: Leaving directory '/root/memcached-1.6.17/doc'
make[3]: Leaving directory '/root/memcached-1.6.17/doc'
make[2]: Leaving directory '/root/memcached-1.6.17/doc'
make[2]: Entering directory '/root/memcached-1.6.17'
make[3]: Entering directory '/root/memcached-1.6.17'
 /usr/bin/mkdir -p '/usr/local/memcached/bin'
  /usr/bin/install -c memcached '/usr/local/memcached/bin'
 /usr/bin/mkdir -p '/usr/local/memcached/include/memcached'
 /usr/bin/install -c -m 644 protocol_binary.h xxhash.h '/usr/local/memcached/include/memcached'
make[3]: Leaving directory '/root/memcached-1.6.17'
make[2]: Leaving directory '/root/memcached-1.6.17'
make[1]: Leaving directory '/root/memcached-1.6.17'

And then attempting to start memcached with:

sudo systemctl start memcached

results in Failed to start memcached.service: Unit memcached.service not found.

What am I missing here?

(Also Vultr instructs "Test if Memcached is active and running on TCP port 11211" by running netstat -tulpn | grep :11211--when I first tried to do this, I had to install netstat, but running this command does nothing.)

1

There are 1 answers

0
Mustapha On

Since you installed memcached from source, you will need to run the binary directly from the command line to start the service.

/usr/local/memcached/bin/memcached -d -m 64 -l 127.0.0.1 -p 11211