today i installed a fresh Red Hat on my dedicated server. I was trying to install apt, everytime i tried to execute the wget command, i kept getting this error:
Code: wget http://apt.freshrpms.net/pub/freshrpms/redhat/9/apt/apt-0.5.5cnc6-fr1.i386.rpm
--20:21:40-- http://apt.freshrmps.net/pub/freshrpms/redhat/9/apt/apt-0.5.5cnc6-fr1.i386.rpm
=> `apt-0.5.5cnc6-fr1.i386.rpm'
Resolving apt.freshrmps.net... failed: Host not found.
i tried pingin out to yahoo but i can't
can you please help!
Comments and replies About Help I Can't Ping Getting Error Failed: Host Not Found Linux Shell Pinging
if you can't ping out, there may be several problems with your network.
STEP1
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
the first thing to do is to check if you are able to ping yahoo with only the ip address. try this:
Code:ping 66.94.234.13
if you get replies, then that means you have a problem with your DNS setting. you need to correct this, to do this, follow the instruction below where it says "TROUBLESHOOTING DNS NAMESERVER" BUT if you don't get any replies, go down to the next step below where is says "CONTINUE"
-------------------------------------------------------------
TROUBLESHOOTING DNS NAMESERVER
to troubleshoot dns problem, check to see if you have the right dns server setup in your network interface (eth0). send this command:
Code:cat /etc/resolv.conf
you should get the list of you nameserver, if you find it that they are incorrect, change them.
---------------------------------------------------------------
STEP2
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CONTINUE
if you find that you CAN'T ping and you have the right DNS servers, try pinging the name server, if you get reply, continue with the next step, otherwise, check with your isp to confirm the nameservers IP address, you may have the wrong one, but if they are correct, continue on...
STEP3
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
now that you are sure you have the correct namesavers, check to see if your network is enabled: send this command:
Code:/etc/init.d/network restart
you should get something that looks like this:
Code:Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Setting network parameters: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
IF YOU DON"T get this, you have a problem with your interface, check to make sure you have a cable connected and that the link light is turned on on the nic card, if its now, you may have a bad cable, replace it. IF you get a FAIL on the shutting down part but OK on the bringin up part, try pinging, if you are able to ping now, great, but if you are not, continue on with troublehooting the pinging problem.
STEP4
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Now that you know that your interface (network) come up ok when you restart, the next thing is to check you default gateway. send this command to check your default gateway:
Code:cat /etc/sysconfig/network
you should get something like this:
Code:NETWORKING=yes
HOSTNAME=host.domain.com
GATEWAY=208.96.2.161
If you see that you have the wrong gateway, change it and see if you can ping now