Friday, 20 November 2020

How to change Hostname in Oracle Cloud Infrastructure (OCI) private Instance on Oracle Linux Server 7




The Following steps in order to change hostname in OCI private Instance on Linux 7:-


Step 1:  At First, we need to update the /etc/hostname:

Ø  hostnamectl set-hostname <host new name>




Step 2:  Update the OCI configuration file :- change PRESERVER_HOSTINFO=2

             Ø    vi  /etc/oci-hostname.conf



Step 3: Update  the FQDN from OCI console GUI


Go to Compute->Instance-> Attached VNICs



      As given below edit the attached VNICs and change the hostname to update FQDN.
   

Note:-  VNIC  <name> and <hostname>  should be same otherwise you will not be able to login.

   Step 4: Update the /etc/hosts file

[root@private-instance ~]# vi /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

10.110.9.1 private-instance.sub00100830273.privatevcn.oraclevcn.com private-instance

 

 

Step 5: Reboot the Instance and verify the hostname.



2 comments:

  1. Sarfaraz Oracle Dba Blog: How To Change Hostname In Oracle Cloud Infrastructure (Oci) Private Instance On Oracle Linux Server 7 >>>>> Download Now

    >>>>> Download Full

    Sarfaraz Oracle Dba Blog: How To Change Hostname In Oracle Cloud Infrastructure (Oci) Private Instance On Oracle Linux Server 7 >>>>> Download LINK

    >>>>> Download Now

    Sarfaraz Oracle Dba Blog: How To Change Hostname In Oracle Cloud Infrastructure (Oci) Private Instance On Oracle Linux Server 7 >>>>> Download Full

    >>>>> Download LINK

    ReplyDelete