DNSOnly: How to change hostname ?

Astral God

Well-Known Member
Sep 27, 2010
180
0
66
127.0.0.1
cPanel Access Level
Root Administrator
Hi.

In "normal" WHM we can do it trough Home >> Networking Setup >> Change Hostname, but what about DNSOnly ?

Also, when i run "yum update" on my DNSOnly server, i have 126 packages on update list. Is this normal that DNSOnly doesn't auto-update these packages (like bind, openssh, etc.) ?

Thanks.
 
Last edited:

pwhjenny

Well-Known Member
Aug 31, 2012
138
0
91
cPanel Access Level
Root Administrator
You can update.

/etc/sysconfig/network file..[depends on the operating system though]

It contains hostname field.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,903
2,237
463
Hello :)

You can update the hostname with the following command:

Code:
# hostname new.server.name
Simply replace "new.server.name" with the name of the hostname you want to use.

Thank you.
 

Astral God

Well-Known Member
Sep 27, 2010
180
0
66
127.0.0.1
cPanel Access Level
Root Administrator
Thanks, i've do it (hostname new.server.name) rebooted, but old hostname is always there !

And what about:

Also, when i run "yum update" on my DNSOnly server, i have 126 packages on update list. Is this normal that DNSOnly doesn't auto-update these packages (like bind, openssh, etc.) ?
?
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,903
2,237
463
Thanks, i've do it (hostname new.server.name) rebooted, but old hostname is always there !
Is this a VPS server? If so, you will need to contact your VPS hosting provider to ensure they configure the new hostname from the VPS hardware node.

Also, when i run "yum update" on my DNSOnly server, i have 126 packages on update list. Is this normal that DNSOnly doesn't auto-update these packages (like bind, openssh, etc.) ?
You can determine if packages are updated automatically by viewing the following file:

Code:
# /etc/cpupdate.conf
Check the "SYSUP" value in the above file to ensure it's set to "daily" if you want automatic package updates to occur during the daily cPanel update cron job.

Thank you.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
41
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
In that ticket, it appears we had to manually modify /etc/sysconfig/network file instead. Please also ensure /etc/hosts was revised in the process, since modifying /etc/sysconfig/network doesn't automatically populate /etc/hosts file. I don't see that having been noted as performed in the ticket.

As for the yum issue, it appears that it was able to update after the hostname was revised. Automatic updates didn't occur due to the fact that yum-updatesd not being installed. The following forum thread was noted in the ticket to discuss that specific issue:

how to make 'yum update' on CentOS recurring and automatic?