1.先是查看本机DHCP配置文件:rpm -ql dhcp | more 找到dhcpd.conf.sample文件,然后将此文件copy 到/etc目录下
2.cp dhcpd.conf.sample /etc/dhcpd.conf
3.vi /etc/dhcpd.conf 打开此文件后将DNS网关等全部注释掉,只留下地址池 和租约时间:
range dynamic-bootp 192.168.0.128 192.168.0.255;
default-lease-time 21600;
max-lease-time 43200;
然后保存退出
4.service dhcpd start 就OK 了!