Changing Host Name in CentOS Linux

This is standart tutorial but i think many IT officer forget it ^^ so i note in my site which title Changing hostname in CentOS Linux

 

Changing hostname in CentOS Linux

First, We need edit the following file below

/etc/sysconfig/network
/etc/hosts

1.

  vi /etc/sysconfig/network

HOSTNAME=”server1.my-z.info”

changing whatever name you want, save and close the file

2. Edit /etc/host file

you need change the host that is set to your IP address on server

127.0.0.1 localhost
10.240.40.209 server1.my-z.info server1  # Added by ZF

save and close the file

set manually that hostfile without reboot

hostname server1.my-z.info

and restart service network

/etc/init.d/networking restart

 

 

source

Masukkannya Gengs!