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 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南