无法在启动时启用 isc-dhcp-server

无法在启动时启用 isc-dhcp-server

我已经在 Proxmox/Debian 上安装了 DHCP 服务器,并进行了所需的配置以使其可供使用。但是当我运行命令时

root@debian:~# systemctl enable isc-dhcp-server
isc-dhcp-server.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable isc-dhcp-server

我检查了一下/etc/systemd/system,没有isc-dhcp-server.service在那里找到文件。

当通过 init.d 运行 isc-dhcp-server 时,它运行良好

root@debian:~# /etc/init.d/isc-dhcp-server start
[ ok ] Starting isc-dhcp-server (via systemctl): isc-dhcp-server.service.

验证其运行状态没有任何问题。

root@debian:~# systemctl status isc-dhcp-server
● isc-dhcp-server.service - LSB: DHCP server
   Loaded: loaded (/etc/init.d/isc-dhcp-server; generated; vendor preset: enabled)
   Active: active (running) since Sun 2020-02-09 07:59:09 EET; 5min ago
     Docs: man:systemd-sysv-generator(8)
 Main PID: 24376 (dhcpd)
    Tasks: 1 (limit: 4915)
   Memory: 8.9M
      CPU: 13ms
   CGroup: /system.slice/isc-dhcp-server.service
           └─24376 /usr/sbin/dhcpd -q -d --no-pid -cf /etc/dhcp/dhcpd.conf vmbr0

Feb 09 07:59:09 pvps systemd[1]: Started DHCP server.
Feb 09 07:59:09 pvps dhcpd[24376]: Wrote 0 deleted host decls to leases file.
Feb 09 07:59:09 pvps dhcpd[24376]: Wrote 0 new dynamic host decls to leases file.
Feb 09 07:59:09 pvps dhcpd[24376]: Wrote 0 leases to leases file.

所以显然一切都设置得很好,除了我无法在启动时启用它,如顶部消息所示。有什么建议请多多指教,谢谢!

相关内容