{"id":943,"date":"2022-11-24T16:43:08","date_gmt":"2022-11-24T08:43:08","guid":{"rendered":"https:\/\/airy.cn\/WordPress\/?p=943"},"modified":"2022-11-24T16:43:09","modified_gmt":"2022-11-24T08:43:09","slug":"how-to-change-host-name-and-fqdn-of-a-compute-instance-oracle-cloud-infrastructure","status":"publish","type":"post","link":"https:\/\/airy.cn\/WordPress\/?p=943","title":{"rendered":"How to change host name and FQDN of a Compute instance Oracle\u00a0Cloud Infrastructure"},"content":{"rendered":"\n<p>How to change host name and FQDN of a Compute instance<\/p>\n\n\n\n<p><a href=\"https:\/\/community.oracle.com\/customerconnect\/discussion\/637593\/how-to-change-host-name-and-fqdn-of-a-compute-instance-doc-id-2779919-1\">https:\/\/community.oracle.com\/customerconnect\/discussion\/637593\/how-to-change-host-name-and-fqdn-of-a-compute-instance-doc-id-2779919-1<\/a><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Applies to:&nbsp;<\/h2>\n\n\n\n<p>Oracle&nbsp;Cloud Infrastructure<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Goal<\/h2>\n\n\n\n<p>This&nbsp;document explains how to change the host name and fully qualified domain name (FQDN) of a Compute instance.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Solution<\/h2>\n\n\n\n<p><strong>To change the hostname of an Oracle Linux pre 7&nbsp;instance:<\/strong><\/p>\n\n\n\n<p>Edit &#8220;\/etc\/sysconfig\/network&#8221; to change the parameter value for&nbsp;<strong>HOSTNAME<\/strong>.<\/p>\n\n\n\n<p>For example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><em># cat \/etc\/sysconfig\/network<\/em>\nNETWORKING=yes\nHOSTNAME= &lt;HOST NAME&gt;\n<\/pre>\n\n\n\n<p>In the file &#8220;\/etc\/oci-hostname.conf&#8221; change the value of PRESERVE_HOSTINFO to&nbsp;2.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/etc\/oci-hostname.conf\nPRESERVE_HOSTINFO=2\n<\/pre>\n\n\n\n<p>Reboot the operating system (OS), and after recovery, run the following command&nbsp;<\/p>\n\n\n\n<p>to confirm the updated hostname:<\/p>\n\n\n\n<p><code>hostname<\/code><\/p>\n\n\n\n<p><strong>To change the hostname inside Oracle Linux 7, CentOS, and RHEL instances:<\/strong><\/p>\n\n\n\n<p>Tagged:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/community.oracle.com\/customerconnect\/discussions\/tagged\/631-oracle-linux\">Oracle Linux<\/a><\/li><li><a href=\"https:\/\/community.oracle.com\/customerconnect\/discussions\/tagged\/631-inux\">Linux<\/a><\/li><li><a href=\"https:\/\/community.oracle.com\/customerconnect\/discussions\/tagged\/631-lxkm\">LXKM<\/a><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>How to change host name and FQDN of a Compute instance  &#8230; <a title=\"How to change host name and FQDN of a Compute instance Oracle\u00a0Cloud Infrastructure\" class=\"read-more\" href=\"https:\/\/airy.cn\/WordPress\/?p=943\" aria-label=\"\u9605\u8bfb How to change host name and FQDN of a Compute instance Oracle\u00a0Cloud Infrastructure\">\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kadence_starter_templates_imported_post":false,"footnotes":""},"categories":[2],"tags":[],"class_list":["post-943","post","type-post","status-publish","format-standard","hentry","category-airy-tech"],"_links":{"self":[{"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/posts\/943","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=943"}],"version-history":[{"count":1,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/posts\/943\/revisions"}],"predecessor-version":[{"id":944,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/posts\/943\/revisions\/944"}],"wp:attachment":[{"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=943"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=943"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=943"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}