Random   •   Archives   •   RSS   •   About   •   Contact

Set static hostname for RHEL Centos 7 on AWS

This took me about 2 hours to figure out, hopefully it saves you time.

/etc/sysconfig/network:

HOSTNAME=desired-hostname.example.com

/etc/hostname:

desired-hostname.example.com

/etc/cloud/cloud.cfg:

preserve_hostname: true



Want comments on your site?

Remarkbox — is a free SaaS comment service which embeds into your pages to keep the conversation in the same place as your contentr. It works everywhere, even static HTML sites like this one!

Remarks: Set static hostname for RHEL Centos 7 on AWS

© Russell Ballestrini.