单位memcached.安装memcached时,在Ubunto 20.04上找不到服务



我试图按照这些说明在Ubuntu 20.04的Vultr上安装memcached,但是当我到达步骤sudo make install时,输出是:

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'

然后试图启动memcached:

sudo systemctl start memcached

导致Failed to start memcached.service: Unit memcached.service not found.

我在这里错过了什么?

(Vultr还指示"测试Memcached是否激活并在TCP端口11211上运行";通过运行netstat -tulpn | grep :11211——当我第一次尝试这样做时,我必须安装netstat,但是运行这个命令没有任何作用。)

由于您是从源代码安装了memcached,因此您需要直接从命令行运行二进制文件来启动服务。

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

相关内容

  • 没有找到相关文章