Re: Use EPEL without redirection ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



In article <3be1bec7-3d50-f8df-7012-982573d9ae80@xxxxxxxxxxxxx>,
Nicolas Kovacs <info@xxxxxxxxxxxxx> wrote:
> Hi,
> 
> Is there any way to deactivate the redirection to a mirror when using
> the third-party EPEL repository ?
> 
> Our network uses a transparent HTTP/HTTPS proxy with a local AC. We can
> create exceptions for sites like centos.org or
> download.fedoraproject.org, but whenever we want to install a package
> from EPEL, the mirror redirection causes an error due to redirection.
> 
> Any suggestions ?

Firstly in /etc/yum.repos.d/epel.repo you need to use baseurl instead
of mirrorlist. I assume you are already doing this.

So then you need to do a curl -i to the baseurl (change $basearch to either
i386 or x86_64) to see where it is redirecting you. For example:

$ curl -i http://download.fedoraproject.org/pub/epel/6/i386
HTTP/1.1 302 Found
Date: Tue, 22 May 2018 09:04:35 GMT
Server: Apache/2.4.29 (Fedora) mod_wsgi/4.5.15 Python/2.7
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Referrer-Policy: same-origin
Content-Length: 0
Location: https://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/epel/6/i386/
Content-Type: text/html; charset=UTF-8
AppTime: D=4793
AppServer: proxy14.fedoraproject.org

Then edit baseurl in epel.repo to use the URL listed in Location: instead, changing
the i386 or x86_64 back to $basearch

Then you can create an exception for the specific host you configured.

Cheers
Tony
-- 
Tony Mountifield
Work: tony@xxxxxxxxxxxxx - http://www.softins.co.uk
Play: tony@xxxxxxxxxxxxxxx - http://tony.mountifield.org
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]


  Powered by Linux