Oracle OCI 修改 Compute Instance Hostname
Oracle OCI 修改 Compute Instance Hostname
- Oracle Linux 7 及之后的版本
Oracle Linux 7 及之后的版本
1, Update the /etc/hostname file with below command.
hostnamectl set-hostname <new name>
2, Edit the oci configuration file for hostnames as given below to update the needed value to 2.
vi /etc/oci-hostname.conf--- modify
PRESERVE_HOSTINFO=2
---
3, Edit the FQDN from OCI console GUI
go to compute instances
–> select the instance
–> scroll down
–> at the left bottom corner select attached VNIC under resources
–> edit appropriate VNIC
–> change hostname to update FQDN
–> update VNIC
4: Reboot the instance
5: Check the hostname with hostname command.
6: Check if FQDN is resolving.
host <ip adress>
or
nslookup <ip adress>
完结!