|
|
Line 1: |
Line 1: |
− | == Change hostname of server == | + | == Change hostname == |
| | | |
− | To change the hostname, connect to the Web Portal and do:
| + | This procedure applies to TMG800, TMG3200 and TMG7800 with static IP. |
| + | Require Version rel2.9 and above |
| | | |
− | *Edit host configuration | + | *ssh to the Centos host: |
− | <pre>Hosts->Edit | + | *Do shell command "hostname" to show the current hostname |
− | Name: input new hostname
| + | <pre> |
− | Save
| + | hostname |
| </pre> | | </pre> |
− | The procedure to modify the host name will depends on the OS used. Please look for the official way to modify the hostname.
| |
| | | |
− | The following example will show how to modify the host name of a CentOS ([[TMP6400-CTRL]]) and TBLinux ([[TMG800]], [[TMG3200]]) host:
| + | *Change to the new name: |
− | | + | |
− | '''WARNINIG:''' There are several files to modify and it is possible that some of them do not contain the hostname. '''DO NOT''' modify the file if the hostname is not included in the files listed below.<br>
| + | |
| <pre>hostname NewHostName | | <pre>hostname NewHostName |
| </pre> | | </pre> |
− | *Modify the DHCP_HOSTNAME parameter of the network file (''modify only if present'')<br>
| |
− | <pre>vi /etc/sysconfig/network-scripts/ifcfg-eth0
| |
− | </pre>
| |
− | Add this next interfaces for [[TMP6400-CTRL]] only:<br>
| |
− | <pre>vi /etc/sysconfig/network-scripts/ifcfg-eth1
| |
− | </pre>
| |
− | Add this next interfaces for [[TMP6400-CTRL]] only:<br>
| |
− | <pre>vi /etc/sysconfig/network-scripts/ifcfg-eth2
| |
− | </pre>
| |
− | *Modify the HOSTNAME parameter of the network file (''modify only if present'')<br>
| |
− | <pre>vi /etc/sysconfig/network
| |
− | </pre>
| |
− | *Modify the name of the host in this file (''modify only if present'')
| |
− | <pre>vi /etc/hosts
| |
− | </pre>
| |
− | After modifying the hostname, it is required to apply the Toolpack configuration again using the web portal.
| |
| | | |
− | *Activate config: | + | *Restart toolpack: |
− | <pre>Systems -> Edit -> Activate
| + | |
− | </pre>
| + | |
− | <br> You need to do this for all configurations.
| + | |
− | | + | |
− | ''(Reference: trk#7921)''
| + | |
− | | + | |
− | <br>
| + | |
− | | + | |
− | If the Web portal is not accessible you can do direct MySQL commands:<br>
| + | |
− | <pre>mysql -utbdb -ptbdbpw
| + | |
− | use toolpack_0;
| + | |
− | update host_configurations set name = 'NewHostName';
| + | |
− | select * from host_configurations;</pre>
| + | |
− | Change hostname of the host:<br>
| + | |
− | <pre>hostname NewHostName
| + | |
− | </pre>
| + | |
− | Restart Toolpack for linux:<br> | + | |
| <pre>tbtoolpack stop | | <pre>tbtoolpack stop |
| tbtoolpack start | | tbtoolpack start |
− | </pre>
| |
− | For windows, restart service:<br>
| |
− | <pre>services.msc
| |
− | tbtoolpack_12358 -> Restart
| |
| </pre> | | </pre> |
This procedure applies to TMG800, TMG3200 and TMG7800 with static IP.
Require Version rel2.9 and above