Enabling DHCP with Hostname
- To set the hostname, do the following:
- Edit /etc/sysconfig/network to look like the following:
- Save and exit.
- Then edit your ifcfg-eth0 config file with the following command:
- Edit /etc/sysconfig/network-scripts/ifcfg-eth0 to look like the following:
BOOTPROTO=dhcp
HWADDR=00:E0:81:63:99:81 # This line is different for every card
ONBOOT=yes
TYPE=Ethernet
DHCP_HOSTNAME={hostname}
USERCTL=no
PEERDNS=yes
IPV6INIT=no
- Save and exit.
- Next, type in the following on the command promt to set hostname: