Guide to change hostname on TINOHOST Panel client page and on VPS command line

For some reason you want to change the hostname, Here Tinohost will guide you to change the hostname on the tino Panel and on the VPS command line.



Change hostname on Tino Panel


First, visit the service management page at: https://my.tino.org/clientarea.php?action=services


10.03.2019-08.07.27


Click to access the VPS service management panel you want to change the hostname of.


10.03.2019-08.10.07


The current hostname is: cloud8442.tino.org I want to change to vps.vanphong.com. Next I choose the icon hostname on the management panel.


10.03.2019-08.13.37


Your browser will display a new box that allows you to enter hostname information you want to change over. Enter the hostname you want to change and click change Hostname to confirm redemption.


10.03.2019-08.19.07


The browser will display a popup informing the hostname change is complete, you just need to reboot VPS for the hostname change to apply.


10.03.2019-08.21.29


Click on OK and then click on reboot VPS button and check again after 5-10 minutes.


10.03.2019-08.27.05


You check again to see that the Hostname has changed successfully.


10.03.2019-08.35.09


 


Change hostname on VPS terminal


When accessing ssh into vps you can check the current hostname with the command:


hostname

10.03.2019-08.41.11


 


Change to the new hostname is


vps1.vanphong.com


Run the command:


hostname "vps1.vanphong.com"

Đối với centos 7:
hostnamectl set-hostname vps1.vanphong.com

Edit the following file:/etc/sysconfig/network


And add the following configuration snippet:


NETWORKING=yes
HOSTNAME= vps1.vanphong.com

Edit the host file: # nano /etc/hosts



  • Change the last block:


127.0.0.1 vps1.vanphong.com vps1.vanphong
::1 vps1.vanphong.com vps1.vanphong


  • Add at the end of the VPS IP and the corresponding hostname: xxx.xxx.xxx.xxx vps1.vanphong.com  


Restart the server and check the results:


# reboot
# hostname

Implementation on Ubuntu



  • Check the current hostname:# hostname

  • Change the hostname: # hostname vps1.vanphong.com

  • Edit file hostname: # nano /etc/hostname

  • Edit the host file (like CentOS): nano /etc/hosts


Note: For Ubuntu version 14.04 and above, you only need to change the hostname with a single command:


# hostnamectl set-hostname vps1.vanphong.com

 


Good luck.