Changes
Key: Additions Deletions
To convert a dhcp OEL to Static IP address edit file:
[root@ucm2 network-scripts]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.8.118
NETMASK=255.255.255.0
GATEWAY=192.168.8.1
TYPE=Ethernet
change the hostname here:
[root@ucm2 network-scripts]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=ucm2
# HOSTNAME=ucm2.ftravers.com # Note can put fully qualified or not
See that hosts is correct too:
[root@ucm2 network-scripts]# cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.8.118 ucm2
DNS is set in resolv.conf file
[root@ucm2 network-scripts]# cat /etc/resolv.conf
nameserver 192.168.8.1
Now you can restart your network services with the following command:
[root@dhcp-onepacificplace-10-179-252-87 network-scripts]# service network restart