We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
Host name is not persistent in CentOS 7
Host name is not persistent in CentOS 7
Hi guys.
I tried everything to sort this. I have chosen a proper host name during the installation, I have tried changing the hosts file, using VestaCP panel... But the host name for my installation continues changing to that one defined by my VPS providers (OVH). Is any of you having the same issue or knows how to change it and make it persistent?
Thanks!
Edit:
After communicating with OVH, the answered me the following:
I can confirm that it works. contained a message asking not to modify its content, and until now, I was respecting it (and maybe that's the reason why it was not working).
I tried everything to sort this. I have chosen a proper host name during the installation, I have tried changing the hosts file, using VestaCP panel... But the host name for my installation continues changing to that one defined by my VPS providers (OVH). Is any of you having the same issue or knows how to change it and make it persistent?
Thanks!
Edit:
After communicating with OVH, the answered me the following:
If you reboot the OS it should stick with the set hostname.1. Edit /etc/sysconfig/network:2. Update /etc/hosts:Code: Select all
HOSTNAME=hostname.domain.com
3. Run the hostname command to get OS to remember:Code: Select all
149.202.50.229 hostname.domain.com hostname
4. Check if it knows the hostname:Code: Select all
hostnamectl set-hostname hostname.domain.com
hostname.domain.comCode: Select all
[root@vps ~]# hostname
5. Restart the interface:Code: Select all
/etc/init.d/network restart
I can confirm that it works.
Code: Select all
/etc/sysconfig/network