• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 173
  • Last Modified:

servername change??

how can i change the annoying "localhost" server name?

and please give me an answer that works, not speculation or links to sites that i have to research.  i can do that myself.  thank you kindly.
0
nynex
Asked:
nynex
1 Solution
 
nynexAuthor Commented:
Adjusted points to 65
0
 
dcavanaughCommented:
In RedHat, the hostname is set in /etc/rc.d/rc.sysinit if you have no network.  If you have a network it is in /etc/sysconfig/network

You also might want to edit /etc/hosts

I suggest you leave 127.0.0.1 as "localhost", but you can change the name associated with any IP address - especially the IP address of your Ethernet card(s).  The format of the file is as follows:

IPADDRESS   FULLHOSTNAME    ALIAS

Example:
192.168.1.1  rhlinux.mystuff.com   rhlinux


0
 
themCommented:
If you have Redhat you need to edit two files:

/etc/HOSTNAME & /etc/sysconfig/network

Put the information in both places and when you reboot all will be well.

Also put an entry in your hosts file matching the hostname you pick.

Don't remove the localhost entry as bad things will happen.

0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now