Hostname can not change
VPS, on HOST i set hostname, on /etc/hosts and /etc/sysconfig/network there is hostname what i want but in WHM in "change hostname" i have only "server1" of "server1.domain.tld"
When i change in WHM to "server1.domain.tld" everything is ok with change log... But when i reboot vps hostname back to "server1"
So what i need to do?
-
Are you using OpenVZ and Centos7? Its an issue with SolusVM I believe. 1. Set the hostname in WHM 2. in SSH run: # chattr +i /etc/hostname
Reboot, it will stick. In the future, if you need to change the hostname you have to run:# chattr -i /etc/hostname0 -
You are right. That was it. Solved. 0 -
Glad to hear it :) 0 -
Hello, Yes chattr will solve issue. Changing hostname on node end also required as when VPS restart it use hostname which is set in configuration of vps on node. Once it is changed on node end no need of chattr. 0 -
Hello, You may want to report the issue to your VPS hosting provider instead of adding the immutable attribute to the /etc/hostname file. They should be able to provide you with instructions on how to save a new hostname to your VPS configuration. Thank you. 0
Please sign in to leave a comment.
Comments
5 comments