How to change hostname on CentOS 6

I set your /etc/hosts like so ...
    [root@mig-dev-006 ~]# cat /etc/hosts
    127.0.0.1   localhost localhost.localdomain 
    192.168.32.128  ost-dev-00.domain.com ost-dev-00
    192.168.32.129  ost-dev-01.domain.com ost-dev-01
... then you make your /etc/sysconfig/network file like so ...
    [root@mig-dev-006 ~]# cat /etc/sysconfig/network
    NETWORKING=yes
    HOSTNAME=ost-dev-00.domain.com
    NTPSERVERARGS=iburst
... then you run hostname like so ...
    [root@mig-dev-006 ~]# hostname ost-dev-00.domain.com
... and then you run bash 
    [root@mig-dev-006 ~]# bash

Post a Comment

0 Comments