Changing the HOSTNAME on Oracle Enterprise Linux

Either due to cloning or corporate naming standards, you may find the need to change the hostname of an Oracle Enterprise Linux System.

The current hostname for this machine is odlinux.oracledistilled.com and it will be changed to secondary.oracledistilled.com. The hostname can be changed by editing /etc/sysconfig/network as the root user.

[root@odlinux ~]# hostname
Odlinux.oracledistilled.com
[root@odlinux ~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=odlinux.oracledistilled.com
[root@odlinux ~]#

[root@odlinux ~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=secondary.oracledistilled.com
[root@odlinux ~]#

After changing the hostname in you should also change the hostname in /etc/hosts.

[root@secondary ~]# 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
192.168.4.111   wrath.oracledistlled.com        wrath
192.168.4.115   secondary.oracledistilled.com   secondary
::1             localhost6.localdomain6 localhost6
[root@secondary ~]#

While changing the host name is fairly easy care should be taken with applications that might already be installed on the system. Many applications will store the hostname of the system in configuration and start up files at the time of installation. You should check your applications and update their configurations with the new hostname.

5 thoughts on “Changing the HOSTNAME on Oracle Enterprise Linux”

  1. Why not use “hostname -b” to set the host name, and “domainname” to set the domain name?

    Looks like your /etc/hosts file is for a machine with a static IP address. How can the host name be changed on a machine which will receive an address from DHCP?

  2. Новейшие базы данных фирм России 2017 года от производителей, а не посредников!

    Базы данных фирм городов России. как быстро найти клиентов

    Собираем сразу после заказа из открытых источников Интернета, БЕЗ ПРЕДОПЛАТЫ!

    Собираем базы данных САМИ, мы производители, а не посредники.

    Минимальная стоимость наших баз данных – 500 рублей.

    Ответы на вопросы можете получить по этой почте: bazy-gorodow(собака)yandex.ru

    Базы данных фирм городов России. найти клиентов кредиты

  3. Что значит масонский знак G. А в Google одна сплошная буква G. Есть какие то предположения кто такой Серега Брин в Гугле? Уж не масон ли?

Leave a Reply

Your email address will not be published. Required fields are marked *