Repo's

General support questions
GaryWilliams
Posts: 2
Joined: 2017/03/20 14:41:12

Repo's

Postby GaryWilliams » 2017/03/20 14:50:20

Hi All,

I have just installed CentOS 6.6 from a USB stick and I now have a working server. I tried to update the install but got the usual repos' error. I tried searching this forum, but the search facility kept saying "wait for XX seconds '...", so that was no use. I have read through several tutorials on how to setup the correct repo structure, but these were not much help. They assumed that everyone already knows the relevant commands. That is why I have installed CentOS6.6, to learn.

Can anyone help me with a simple list of commands to solve this?

Cheers

Gary

User avatar
TrevorH
Forum Moderator
Posts: 19449
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Repo's

Postby TrevorH » 2017/03/20 15:35:34

Most likely that means your network is not set up correctly. Start by checking /etc/resolv.conf for a valid nameserver x.x.x.x line existing. Check if you can ping things by name e.g. ping www.google.com and if that fails then try by ip address - google's DNS server on 8.8.8.8 responds to ping so is a nice easy one to try. If you cannot ping things by ip address then your network is not working at all - perhaps you forgot to activate it as per the FAQ on https://wiki.centos.org/FAQ/CentOS7#hea ... 15906fa493 ?
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

GaryWilliams
Posts: 2
Joined: 2017/03/20 14:41:12

ALL FIXED - Repo's & DNS not resoulving

Postby GaryWilliams » 2017/03/22 11:07:26

Hi Trevor,

You were correct. The problem was the networking so the repo's could not be found. This is how I fixed it. Edit the following two files with 'vi' and save.

-------------------

1. /etc/resolv.conf

Add "nameserver 8.8.8.8" as the new top line.

My file was empty, so all it now contains is "nameserver 8.8.8.8"

-------------------

2. /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
TYPE=Ethernet
BOOTPROTO=DHCP
ONBOOT=yes
UUID=[Whatever the current value is]
IPV6INIT=no
HWADDR=[Whatever the current value is]
NM_CONTROLLED=no

-------------------

3.

cd [return]
service network restart
service network status

-------------------

Now eth0 should have its' IP address found and the 'yum update -y' will find the reop's and update your server.

Cheers

Gary

User avatar
TrevorH
Forum Moderator
Posts: 19449
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Repo's

Postby TrevorH » 2017/03/22 15:54:28

And now, hopefully, you are running 6.8 and not 6.6 which is old, out of date and insecure.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke


Return to “CentOS 6 - General Support”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest