LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-22-2014, 12:00 PM   #1
dcguru
LQ Newbie
 
Registered: Jul 2013
Posts: 8

Rep: Reputation: Disabled
troubleshooting yum repository in corporate


Hi everyone,

I have been trying to get my centos os to connect to repositories but nothing is working and I've been researching for days now.

What is the proper setup for it behind a company proxy / firewall?
The error I get for "yum update" is:

Click image for larger version

Name:	Linux - yum.jpg
Views:	14
Size:	116.3 KB
ID:	15567

In /etc/environment/ I have the following as the 1st line:
http_proxy="http://proxyname.proxyname.com:80"

In yum.conf I have:

[main]
proxy=http://proxyname.proxyname.com:80/
#rest of file
(previously, there was no "/" after the 80, but it still doesn't fix the error)

I've also seen that people say this is mainly a DNS issue, but I can dig anything on the web, traceroute anything and ping local servers by ip and hostname.


Please help!! And thank you !!
 
Old 05-22-2014, 02:39 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,461

Rep: Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604
yum dose need to be set up and configured if you are using a proxy

CentOS 6 is using the RedHat documentation

but there is some info in the wiki
http://wiki.centos.org/

http://wiki.centos.org/TipsAndTricks/YumAndRPM

http://wiki.centos.org/TipsAndTricks...7ebae9cc4fcb5a

also it might help if you can post the output of
Code:
su -
yum repolist all
 
Old 05-22-2014, 04:51 PM   #3
dcguru
LQ Newbie
 
Registered: Jul 2013
Posts: 8

Original Poster
Rep: Reputation: Disabled
Finally figured it out

The mirror lists that came with my CentOS 6.5 live cd were WRONG. I got the ide to check them after reading the last post here: http://unix.stackexchange.com/questi...omd-xml-for-re

I manually went to the website and LO and Behold, there were no such directories.

So I commented out all "mirrorlist"... lines in /etc/yum.repos.d/CentOS-Base.repo, duplicated the "baseurl" lines and commented them (just in case the changes didn't work and I could revert back) and modified the duplicated "baseurl" line to align with the path found in my browser (on another working machine).

Saved the file, ran yum update and it started working (YAAAY) until it hit a snag (OHHH)... Instead of writing the full path in the duplicated "baseurl" lines, I needed to stop at the system folder because yum will append "repodata/repomd.xml" to the end of the line. So for the path in the modified "baseurl" lines, they followed the pattern:

baseurl=http://mirror.centos.org/centos.6.5/{base|updates|extras|centosplus|contrib}/i386/(yum will append here)

After that, viola!! Game. Set. Match.

Just modify 6.5 to what ever version you are using and it should work

Last edited by dcguru; 05-23-2014 at 08:51 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
yum Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. glowe Linux - Newbie 8 01-13-2016 11:55 PM
yum fails with error: Cannot retrieve repository metadata (repomd.xml) for repository dmendonsa Fedora 6 02-10-2010 08:23 PM
yum segfault troubleshooting bort13 Fedora 0 08-13-2008 09:55 PM
YUM repository Mr.J Linux - Newbie 3 06-27-2008 02:18 AM
Redhat 5.1 Yum Repository vs Fedora x.x Yum Repository lead2gold Linux - Software 1 05-22-2008 03:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration