Ubuntu1604中,redis 设置自启动报错

Web、Mail、Ftp、DNS、Proxy、VPN、Samba、LDAP 等基础网络服务
回复
Jacky10086
帖子: 1
注册时间: 2021-04-01 11:07
系统: 16.04

Ubuntu1604中,redis 设置自启动报错

#1

帖子 Jacky10086 » 2021-04-01 11:15

我在设置redis自启动的时候报错:信息如下:

代码: 全选

root@7d8c9e050b38:/usr/local/redis-6.2.1# update-rc.d redis default
usage: update-rc.d [-n] [-f] <basename> remove
       update-rc.d [-n] <basename> disable|enable [S|2|3|4|5]
		-n: not really
		-f: force

The disable|enable API is not stable and might change in the future.
请问有人知道应该怎么解决吗?
头像
astolia
论坛版主
帖子: 6483
注册时间: 2008-09-18 13:11

Re: Ubuntu1604中,redis 设置自启动报错

#2

帖子 astolia » 2021-04-02 14:08

ubuntu 16.04里的update-rc.d不支持default参数。
另外16.04已经在用systemd了,就别用过时的rc.d方法了。把utils目录下面的systemd-redis_server.service文件复制到/etc/systemd/system/redis_server.service,然后systemctl enable redis_server
回复