环境:vbox,rhel5.4.

我将镜像

#mount  /dev/hdc  /mnt  

 

/dev/hdc  视情况而定。

在做这些之前应该做好yum的本地安装配置。可以看我的这一篇http://yeelone.blog.51cto.com/1476571/431953

#yum install dhcp

#vi /etc/dhcpd.conf

ddns-update-style interim;

subnet 192.168.1.0 netmask 255.255.255.0{

option routers 192.168.1.254;

option broadcast-address 192.168.1.255;

option subnet-mask 255.255.255.0;

option domain-name-dns 8.8.8.8;

range 192.168.1.0 192.168.1.50;

}

host serverdhcp {

hardware enternet 0a:00:27:00:00:00;

fixed-address 192.168.1.51;

}

:wq

#system-config-securitylevel 

开放udp 67 和udp68端口。

这样应该是可以正常启动的。如果启动失败。可以输入命令:

#dhcpd

 或者:

#vi /var/log/message 查看错误信息。一般会提示哪里错。

不过有时候也可能不提示错误,我就遇到这样的情况。我当时的环境是添加了两块网卡,dhpc启动时总是失败。

当把另一个网卡关掉之后,就可以正常启动了。