AWS instance after machine hostname change, the server loose connection after while

0

Hi all,

OS: SLES15 Server: EC2 with Load Balancer and Auto Scaling

After changing the hostname as "sudo hostnamectl set-hostname webserver.mydomain.com", the server loose connection after a while.

Any ideas how to make it stable? Thank you

Carlo
已提问 4 个月前196 查看次数
1 回答
1

Hostname can be made permanent with below steps:

  1. Set hostname $ sudo hostnamectl set-hostname new-hostname

$ sudo vi /etc/hosts

Find the localhost string and append the new hostname.

127.0.0.1 localhost webserver.mydomain.com

Save and exit

  1. Confirm the change in hostname:

$ hostnamectl

Please refer: https://repost.aws/knowledge-center/linux-static-hostname-suse

AWS
已回答 4 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则