Before starting to use Red Hat Enterprise Linux 5 or CentOS 5, the static host name table lookup file /etc/hosts must be corrected first. The steps below describes how to do this.

Configure Hosts

File Browser1. Click Applications, select System Tools then click File Browser. This will launch the File Browser window.
File Browser2. In the Location field, type in /etc and press Enter. If you don’t see the Location field, click the notepad button to toggle to text-based location bar.
Edit hosts3. Locate and double click on the file hosts to open it for editing. Update the content similar to the lines below.       localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6     mail.acme.local mail
Replace the last line with your own IP address, fully qualified domain name and host name.

Test the Host Name Lookup

Terminal1. Click Applications, select Accessories, and click Terminal. This will launch the Terminal window.
ping localhost2. In the terminal window, type in the command below.
ping localhost
You should see localhost.localdomain and
ping localhost3. Next, type in the command below.
ping mail
Replace mail with your own hostname. You should see your fully qualified domain name and ip address.

Visit the forum to ask for help or to give a comment.

Posted on 8/7/2010 and last updated on 8/29/2010
Filed under CentOS 5 , Red Hat Enterprise Linux 5 , System Administration