实验:
CentOS 6.5 / DHCP Server 4.1.1-P1
1 | #yum -y install dhcp |
1 | ddns-update-style interim; |
指定主机给其分配ip
1 | host boss { boss为主机名,随便取; |
可能出现的状况:(不过一般出错,就是配置不正确,另外就是dhcpd.conf没放正确位置)
1 | #service dhcpd start |
[failure]
1 | #tail -n 25 /var/log/messages |
Can’t chown new lease file: Operation not permitted
1 | #vim /etc/rc.d/init.d/dhcpd |
user=dhcpd
group=dhcpd
改为
user=root
group=root
1 | #service dhcpd start即可; |
1 | #netstat -ntulp |
udp 0 0 0.0.0.0:67 0.0.0.0:* 5346/dhcpd