0

I am attempting to redo my server (CentOS release 6.6 [Final] x86_64) and I am now getting the following output on yum

[root@server ~]# yum update
Loaded plugins: fastestmirror, priorities, security
Setting up Update Process
Determining fastest mirrors
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os&infra=stock error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: base

Because it's relevant here is my /etc/resolv.conf

nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver IP ADDRESS
nameserver IP ADDRESS
search au.sever.com vmware.au.server.com

This is an output for a dig

[root@server ~]# dig @8.8.8.8 www.google.com

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.30.rc1.el6 <<>> @8.8.8.8 www.google.com
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached

I have also run ifdown eth0 && ifup eth0 and it appears to have run sucessfully

Additionally my /etc/named.conf file is empty. I don't know why and/or what to put in it...

I can't ping google.com either...

Joshua
  • 147
  • 1
  • 2
  • 8
  • First thing to do would be to connect it to the Internet. – Michael Hampton Nov 10 '14 at 06:30
  • It's a vps and I am connecting to it via SSH, I am assuming this means it's internet connected. (I don't mean for that to sound facetious) – Joshua Nov 10 '14 at 06:36
  • 1
    What do you get when you try resolving `mirrorlist.centos.org` specifically? Also, does your /etc/resolv.conf literally have two lines that read `nameserver IP ADDRESS`? – Mike B Nov 10 '14 at 07:08
  • Hi @MikeB When I ping `google.com` the output is `ping: unknown host google.com` I assume the same would be for `mirrorlist.centos.org` and I removed the IP Address. Upon further investigation, it appears to be my internal IP Address. – Joshua Nov 10 '14 at 07:18
  • @Joshua So you can't reach any sites? It sounds like it's not a DNS issue - it just can't connect at all. What do you have set under `/etc/sysconfig/network`? Is `GATEWAY=` set to the right IP for your default router/gateway? If you're not sure, I'd check with your VPS host. They should be able to confirm. – Mike B Nov 10 '14 at 07:25

1 Answers1

2

I found out my problem my /etc/sysconfig/network-scripts/ifcfg-eth0 was incorrect bootproto was set to none or something similar, I changed it to static then rebooted and everything came online.

Joshua
  • 147
  • 1
  • 2
  • 8