The Pakistani Spectator

A Candid Blog



Oracle 11g on Redhat Linux : How to change the IP address

By Sharafat • May 15th, 2009 • Category: Technology • No Responses

Following are the steps to change the IP address of the Linux machine, where Oracle 11g is installed.

1. Edit the following file as root:
/etc/sysconfig/network-scripts/ifcfg-eth0
Note, eth0 is the name of the network interface configured
# cat /etc/sysconfig/network-scripts/ifcfg-eth0

# Broadcom Corporation NetXtreme BCM5754 Gigabit Ethernet PCI Express
DEVICE=eth0
BOOTPROTO=static
HWADDR=00:1A:A0:B2:B2:5B
ONBOOT=yes
IPADDR=192.168.79.120
NETMASK=255.255.255.0
NETWORK=192.168.79.0

Change the IP address, Netmask and Network lines to the new values, eg:
IPADDR=192.168.78.110
NETMASK=255.255.0.0
NETWORK=192.168.78.0

Save the file

2. Edit the ‘/etc/hosts’ file as root to reflect the new IP address
# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.79.120 ora2.oracle.com ora2

to
# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.78.110 ora2.oracle.com ora2

3. Restart the network service by running the following as root or simply reboot the O/S:
# /etc/init.d/network restart

- routing tables may have to be updated if used
- this will interrupt the network service
- make sure you have configured other services for this new ip address ( eg: httpd )

4. Ping the new IP address and/or hostname to ensure that the network interface works and that the hostname is resolved to the new IP address
# ping 192.168.78.110
PING 192.168.78.110 (192.168.78.110) 56(84) bytes of data.
64 bytes from 192.168.78.110: icmp_seq=1 ttl=64 time=1.61 ms
64 bytes from 192.168.78.110: icmp_seq=2 ttl=64 time=0.163 ms
64 bytes from 192.168.78.110: icmp_seq=3 ttl=64 time=0.151 ms

— 192.168.78.110 ping statistics —
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 0.151/0.642/1.613/0.686 ms


Trackback URL

Tagged as: , , , , ,

Click For More Articles By Sharafat
All posts by Sharafat
You can follow any responses to this entry through the RSS 2.0 feed.

Leave a Reply (Read Comment Policy)

TPS has started observing minimal and mainly automatic comments moderation. Our automatic moderation tool tries to moderate comments on the basis of inappropriate keywords. If you feel that your valid and proper comment has been moderated, then please let us know, and we will promptly look into it. If you feel that an inappropriate comment has been ignored by tool, then let us know please, and we will check it. Thanks for your visit and help.