我正在尝试按照以下教程在 CentOS 7 上的笔记本电脑上设置 PXE 服务器以连接到物理测试客户端: https ://www.linuxtechi.com/configure-pxe-installation-server-centos-7/#评论 35567
所有的配置文件和设置程序都来自这个网站。在“步骤:6 启动并启用 xinetd、dhcp 和 vsftpd 服务。”,命令:“systemctl start xinetd”和“systemctl enable xinetd”工作,但是当我运行命令:“systemctl start dhcpd.service”时,我收到以下错误消息:
Job for dhcpd.service failed because the control process exited with error code. See “systemctl status dhcpd.service” and “journalctl -xe” for details.
当我运行“systemctl status -l dhcpd.service”时,我收到以下错误消息:
systemctl status -l dhcpd.service
dhcpd.service - DHCPv4 Server Daemon
Loaded: loaded (/usr/lib/systemd/system/dhcpd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2022-07-05 11:18:07 EDT; 1min 12s ago
Docs: man:dhcpd(8)
man:dhcpd.conf(5)
Process: 11655 ExecStart=/usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd --no-pid (code=exited, status=1/FAILURE)
Main PID: 11655 (code=exited, status=1/FAILURE)
Jul 05 11:18:07 localhost.localdomain dhcpd[11655]: to which interface virbr0 is attached. **
Jul 05 11:18:07 localhost.localdomain dhcpd[11655]:
Jul 05 11:18:07 localhost.localdomain dhcpd[11655]:
Jul 05 11:18:07 localhost.localdomain dhcpd[11655]: No subnet declaration for enp0s20f0u13 (10.249.6.154).
Jul 05 11:18:07 localhost.localdomain dhcpd[11655]: ** Ignoring requests on enp0s20f0u13. If this is not what
Jul 05 11:18:07 localhost.localdomain dhcpd[11655]: you want, please write a subnet declaration
Jul 05 11:18:07 localhost.localdomain systemd[1]: dhcpd.service: main process exited, code=exited, status=1/FAILURE
Jul 05 11:18:07 localhost.localdomain systemd[1]: Failed to start DHCPv4 Server Daemon.
Jul 05 11:18:07 localhost.localdomain systemd[1]: Unit dhcpd.service entered failed state.
Jul 05 11:18:07 localhost.localdomain systemd[1]: dhcpd.service failed.
这里还有 Dhcpd.conf 文件:
#
# DHCP Server Configuration file.
# see /usr/share/doc/dhcp*/dhcpd.conf.example
# see dhcpd.conf(5) man page
#
# DHCP Server Configuration file.
ddns-update-style interim;
ignore client-updates;
authoritative;
allow booting;
allow bootp;
allow unknown-clients;
# internal subnet for my DHCP Server
subnet 172.168.1.0 netmask 255.255.255.0 {
range 172.168.1.21 172.168.1.151;
option domain-name-servers 172.168.1.11;
option domain-name "pxe.example.com";
option routers 172.168.1.11;
option broadcast-address 172.168.1.255;
default-lease-time 600;
max-lease-time 7200;
# IP of PXE Server
next-server 172.168.1.11;
filename "pxelinux.0";
}
我需要在我的 dhcpd.conf 文件中进行哪些更改以使命令“systemctl start dhcpd.service”正常工作,这样我才能完成 PXE 服务器教程?