1,通过编辑/etc/rc.local文件来使dhcp服务开机自启动使用命令vi/etc/rc.local,然后在文件最后一行添加“sudo/etc/init.d/dhcp3-serverstart”就能使dhcp服务开机自启动。
2,使用crontab任务提交计划先写一个简单的检查dhcp服务是否启动了的脚本a.sh:#!/bin/bashps-ef|grepdhcp|grep-vgrepif["$?"-eq"0"]thenexit0elsesudo/etc/init.d/dhcp3-serverstart>/dev/null2>