1

I just inherited a RHEL 4.1 minimal image server and am trying to set it up but I can only seem to access ip addresses and not domain names. (exmaple: wget google.com doesn't work, wget 67.222.5.136 does though).

How can I fix this -- this is preventing me from using yum/rpm etc

user1686
  • 10,162
  • 1
  • 26
  • 42
thanksyo
  • 839
  • 2
  • 8
  • 8

4 Answers4

10

Add your DNS addresses to /etc/resolv.conf.

nameserver <address of DNS1>
nameserver <address of DNS2>
Juliano
  • 5,512
  • 28
  • 28
1

if you get you network configuration with DHCP, check in the file /etc/dhcp3/dhclient.conf that you have the following statement :

request domain-name-servers;
Emmanuel BERNAT
  • 322
  • 1
  • 6
1

Use the /etc/resolv.conf file to determine the DNS servers like this :


nameserver <server dns 1>
nameserver <server dns 2>
If you dont know what dns to use, here an example with opendns servers

cat >> /etc/resov.conf
nameserver 208.67.222.222
nameserver 208.67.220.220 
Ali Mezgani
  • 3,850
  • 2
  • 24
  • 36
0

You need to add some DNS servers to your IP config. You can do this by firing up your favourite editor and adding the following to /etc/resolv.conf :

nameserver <ip of primary DNS server>
nameserver <ip of secondary DNS server>

Alternatively, if you use DHCP to get your IP addresses, make sure that the DHCP server is actually configured to give out Name Servers and then check dhclient.conf (usually /etc/dhcpx/dhclient.conf) includes the following:

request domain-name-servers;
AlexTEH
  • 431
  • 3
  • 6