$ rpm -ql dhcp #检查是否安装dhcp
$ yum -y install dhcp* #安装dhcp
$ cd /etc/dhcp #配置文件位置
$ vim /etc/dhcp/dhcpd.conf
# # DHCP Server Configuration file. # see /usr/share/doc/dhcp*/dhcpd.conf.sample # see 'man 5 dhcpd.conf' # ddns-update-style interim; ignore client-updates; filename "pxelinux.0"; next-server 192.168.10.10; subnet 192.168.0.0 netmask 255.255.255.0{ option routers 192.168.10.1; option subnet-mask 255.255.255.0; range dynamic-bootp 192.168.10.2192.168.10.254; default-lease-time 21600; max-lease-time 43200; }