how to change hostname in RH

1. Find out and set up the value for HOSTNAME in the file /etc/sysconfig/network:
# vi /etc/sysconfig/network

2. Setup/replace HOSTNAME
HOSTNAME=localhost.localdomain

3. Append additional line in hosts file
vim /etc/hosts
192.168.0.1 sample.host.com

4. Restart networking service
service network restart

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s