Tag Archives: ifcfg

Home »  Tag: ifcfg

Setting Up a CentOS / Red Hat Linux DHCP Client First backup your existing network configuration. I assume for all below that the interface is eth0, if this is not the case on your system then edit accordingly. cp /etc/sysconfig/network-scripts/ifcfg-eth0 /root/ifcfg-eth0.bak Do not store the backup in the original directory, it will cause some issues. Then we edit the file vi /etc/sysconfig/network-scripts/ifcfg-eth0 Following is a sample DHCP configuration: DEVICE=”eth0″ BOOTPROTO=”dhcp” HWADDR=”7E:E2:2F:FC:64:FC” NM_CONTROLLED=”yes” ONBOOT=”yes” TYPE=”Ethernet” UUID=”10489fa0-ea13-40c6-b3e9-19ae328c7162″ This would be a sample static configuration: DEVICE=”eth0″ BOOTPROTO=”static” HWADDR=”7E:E2:2F:FC:64:FC” IPADDR=192.168.1.2 NETMASK=255.255.255.0 DNS=192.168.1.1 GATEWAY=192.168.1.1 ONBOOT=”yes” TYPE=”Ethernet” UUID=”10489fa0-ea13-40c6-b3e9-19ae328c7162″ NM_CONTROLLED=”no” Leave vi with Shift+ZZ Just for completeness the DNS is set in the /etc/resolv.conf vi /etc/resolv.conf insert nameserver 192.168.1.1 and restart the network service: service network restart Please note that you need a configuration file for each device that you want to configure. Related posts: RedHat 6.x/CentOS 6.x: Rename RHN Satellite (Spacewalk) Server CentOS / RedHat: Quick Network Bonding eth0 and […]

In relation to rename a server which was acting as a Satellite server. Howto change the Hostname of a RHN Satellite server (Spacewalk Server) 1) you need to change the server to the new IP adress / hostname. I advise to do this in single user mode from the currently running state. Note: Don’t use UPPERCASE in the hostname. Satellite doesn’t like that !!! telinit 1 hostname NEW_HOSTNAME vi /etc/sysconfig/network #change to the new hostname If you need to change the IP Adress then do so here now. vi /etc/sysconfig/network-scripts/ifcfg.[interface] restart networking service network restart  2) DO NOT REBOOT continue here …. spacewalk-hostname-rename CURRENT(NEW_OR_OLD)_IPADRESS Follow the instruction on the screen to reset the hostname. It will do the rest for you Related posts: RedHat 6.x/CentOS 6.x: Rename or change the hostname temporarily or permanently RedHat / RHN Satellite: usefull commands Centos 6.x: How to install Spacewalk Linux: Howto show the Servers IP address at the login console CentOS / […]

%d bloggers like this: