Tuesday, November 15, 2005

hostname - Changing server host name

Before starting ensure that your desired hostname is resolving to the server and read the disclaimer below. Steps in changing the hostname on a plain Red Hat Enterprise Linux server are:

1. Modifying /etc/sysconfig/network (replace XXX.XXX.XXX.XXX with your gateway IP )

NETWORKING=yes
HOSTNAME="plain.ev1servers.net"
GATEWAY="XXX.XXX.XXX.XXX"
GATEWAYDEV="eth0"
FORWARD_IPV4="yes"


2. Modify /etc/hosts (
replace YYY.YYY.YYY.YYY with server ip)
replace server1.company.com with your server name.
replace server1 with your first part of your desired hostname.

127.0.0.1 localhost.localdomain localhost
YYY.YYY.YYY.YYY server1.company.com server1


3. restart kernel logging services

/etc/rc.d/init.d/syslog restart


4. To verify, type the following at prompt

hostname



Disclaimer: Please use this only if you know what you are doing. I take no responsibility if something breaks on your server.

Tags:

0 Comments:

Post a Comment

<< Home