1. dhcp パッケージをインストールします:
# yum install dhcp
2. サンプル ファイル /usr/share/doc/dhcp*/dhcpd.conf.sample をコピーします .
# cp /usr/share/doc/dhcp*/dhcpd.conf.sample /etc/dhcp/dhcpd.conf
3. サンプルの dhcp 構成ファイルは次のようになります。
# cat /etc/dhcp/dhcpd.conf
Allow booting;
Allow bootp;
authoritative;
subnet 192.168.0.0 netmask 255.255.255.0 {
option routers 192.168.0.1;
range 192.168.0.100 192.168.0.200;
default-lease-time 21600;
max-lease-time 43200; 上記のファイルの要件に従って、IP アドレス/範囲とサブネット マスクを変更する必要があります。
4. すべての変更が完了したら、dhcp サービスを再起動します。
# /etc/init.d/dhcpd restart
dhcpd.conf の詳細については、次のコマンドを使用してマニュアル ページを確認してください。
# man dhcpd.conf