3、启动服务
  #dhcpd
  即能够在命令行方式下启动。
  以下可把命令加到启动中。
  编辑或新建/etc/rc.d/init.d/dhcpd文件写入以下内容:
#vi /etc/init.d/dhcpd
. /etc/rc.d/init.d/functions
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
[ -f /usr/sbin/dhcpd ] || exit 0
[ -f /etc/dhcpd.conf ] || exit 0
RETVAL=0
# See how we were called.
case "$1" in
start)
# Start daemons.
echo -n "Starting dhcpd: "
daemon /usr/sbin/dhcpd eth1
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/dhcpd
;;
stop)
# Stop daemons.
echo -n "Shutting down dhcpd: "
killproc dhcpd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/dhcpd
;;
restart|reload)
$0 stop
$0 start
RETVAL=$?
;;
status)
status dhcpd
RETVAL=$?
;;
*)
echo "Usage: dhcpd {start|stop|restart|status}"
exit 1
esac
exit $RETVAL
  当中 daemon /usr/sbin/dhcpd eth0 这句为指定须要对于那一个网卡的IP段内的机器进行解析。
  假设为第二块网卡设 为:eth1
  使用服务命令进行启动和停止
  #service dhcpd start|stop|restart
  无错误输出则该配置文件无误.
  增加到启动服务中:
  #chkconfig --add dhcpd
  #chkconfig --level 2345 dhcpd on
  #chkconfig --list dhcpd
  #dhcpd 0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭