Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Page Tree
expandCollapseAlltrue
rootSecure and Super Nodes


Panel
borderColorgrey
bgColorwhite
titleColorblack
borderWidth1
titleBGColorwhite
borderStylesolid
titleLanguages


This is an optional step, which details how to specify the node hostname



DescriptionCommand
1

Update the /etc/hosts file

    • Replace the default hostname with your desired hostname
      • The default hostname typically follows "127.0.1.1", DO NOT REPLACE "localhost"
      • See example in bold
      • You may need to disable "manage_etc_hosts" like in the example
    • Save and exit with CTRL+x, then type y and hit enter.


NOTE: In the example I use "node01" as my hostname. I'm using the same hostname as my example FQDN:

node01.zentest.win


Code Block
sudo nano /etc/hosts



Panel
borderColorgrey
bgColorblack
titleColorwhite
borderWidth2
titleBGColorblack
borderStylesolid
titleExample Output

# Your system has configured 'manage_etc_hosts' as True.
# As a result, if you wish for changes to this file to persist
# then you will need to either
# a.) make changes to the master file in /etc/cloud/templates/hosts.tmpl
# b.) change or remove the value of 'manage_etc_hosts' in
#......./etc/cloud/cloud.cfg or cloud-config from user-data

127.0.1.1 node01
127.0.0.1 localhost

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts


2

Update the /etc/hostname file

  • Replace the existing hostname with your desired hostname


Code Block
sudo nano /etc/hostname



Panel
borderColorgrey
bgColorblack
titleColorwhite
borderWidth2
titleBGColorblack
borderStylesolid
titleExample Output

node01


3Use systemd services to set the hostname, replacing <HOSTNAME> with your desired hostname


Code Block
sudo hostnamectl set-hostname <HOSTNAME>



Panel
borderColorgrey
bgColorblack
titleColorwhite
borderWidth2
titleBGColorblack
borderStylesolid
titleExample Output

zenops@vps421337:~$ sudo hostnamectl set-hostname node01


4

Reboot the node and log back in as your non-root user to test that the host name has changed

  • You will see the new hostname at your terminal prompt


Code Block
sudo reboot



Panel
borderColorgrey
bgColorblack
titleColorwhite
borderWidth2
titleBGColorblack
borderStylesolid
titleExample Output

zenops@node01:~$



Insert excerpt
Social Links
Social Links
nopaneltrue