If you ever tried to change a server’s hostname inside Oracle’s Cloud Infrastructure you noted that changes are always reverted back once the server is rebooted.
In order to make the changes permanent, you need to add a “PRESERVE_HOSTINFO” flag inside the “oci-hostname.conf” file.
echo "PRESERVE_HOSTINFO=2" >> /etc/oci-hostname.conf hostnamectl set-hostname MYHOSTNAME
Replace “MYHOSTNAME” with your desired hostname.Tags: Oracle
Leave a Reply