Tuesday, April 9, 2013

Getting yum to work with RHEL / RHN behind a proxy


/etc/sysconfig/rhn/up2date

enableProxy=0
httpProxy=proxyserver.company.com:8080


~/.bash_profile

export http_proxy=http://proxyserver.company.com:8080
export HTTP_PROXY=http://proxyserver.company.com:8080


The thing is, there is no universal agreement among linux command line programs, some seem to use HTTP_PROXY and some use http_proxy.  So, yes, export http_proxy both as lower and UPPER case!

And complicating the picture is that RHN doesn't use either of these -- it pulls the settings out of /etc/sysconfig/rhn/up2date 


2 comments:

  1. Did you mean this: enableProxy=1
    instead of this: enableProxy=0

    ReplyDelete
  2. Ah, yes, I think you are right. Thanks.

    ReplyDelete