Toolpack Installation:Change hostname
From TBwiki
(Difference between revisions)
Nicole Tan (Talk | contribs) |
William Wong (Talk | contribs) (→Change hostname) |
||
Line 8: | Line 8: | ||
<pre> | <pre> | ||
hostname | hostname | ||
+ | </pre> | ||
+ | For Centos 7, the hostname command is, | ||
+ | </pre> | ||
+ | hostnamectl | ||
</pre> | </pre> | ||
Line 13: | Line 17: | ||
<pre>hostname NewHostName | <pre>hostname NewHostName | ||
</pre> | </pre> | ||
+ | For CentOS 7, | ||
+ | hostnamectl set-hostname NewHostName | ||
*Restart toolpack: | *Restart toolpack: | ||
Line 18: | Line 24: | ||
tbtoolpack start | tbtoolpack start | ||
</pre> | </pre> | ||
+ | For TMG7800 CentOS 7, do reboot host, and after reboot host, if you notice | ||
+ | /etc/hosts | ||
+ | is still with old name, perform manual change of NewHostName for this file /etc/hosts, then reboot host again | ||
+ | |||
Note: DO NOT change the hostname via webportal. | Note: DO NOT change the hostname via webportal. |
Revision as of 03:03, 26 February 2021
Change hostname
This procedure applies to TMG800, TMG3200 and TMG7800 with static IP for management interfaces. Require Version rel2.9 and above
- ssh to the Centos host
- Do shell command "hostname" to show the current hostname
hostname
For Centos 7, the hostname command is, </pre> hostnamectl </pre>
- Change to the new name:
hostname NewHostName
For CentOS 7, hostnamectl set-hostname NewHostName
- Restart toolpack:
tbtoolpack stop tbtoolpack start
For TMG7800 CentOS 7, do reboot host, and after reboot host, if you notice /etc/hosts is still with old name, perform manual change of NewHostName for this file /etc/hosts, then reboot host again
Note: DO NOT change the hostname via webportal.