LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   troubleshooting yum repository in corporate (https://www.linuxquestions.org/questions/linux-software-2/troubleshooting-yum-repository-in-corporate-4175505783/)

dcguru 05-22-2014 11:00 AM

troubleshooting yum repository in corporate
 
1 Attachment(s)
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:

Attachment 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 !! :)

John VV 05-22-2014 01:39 PM

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


dcguru 05-22-2014 03:51 PM

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 ;)


All times are GMT -5. The time now is 06:04 AM.