change linux hostname

change linux RedHat / CentOS hostname

vim /etc/sysconfig/network
HOSTNAME=servername

vim /etc/hosts
10.10.10.10 servername

hostname servername

verify
hostname

service network restart

Leave a Reply

Your email address will not be published. Required fields are marked *

VAMOVE *

*