hello i have a problem. when i do "yum update or install" it will not work. but it will after i type in export http_proxy= everytime i restart. where is this location of http_proxy ? so i dont have to export each time the centos reboot?

Thanks for looking in.

Adam Ramadhan

  • Have you checked /etc/yum.conf and /etc/yum.repos.d/* for any proxy entries there?
    – malcolmpdx
    Commented Mar 29, 2011 at 3:02
  • like http_proxy ? Commented Mar 29, 2011 at 3:02
  • I think it would be "proxy" followed by a URL. Alternately, this could be a shell thing - post the results of "env | egrep proxy"
    – malcolmpdx
    Commented Mar 29, 2011 at 3:04
  • Actually, this is almost certainly an environmental variable that's being set. If you want to disable it permanently (which likely would break whatever is depending on it being set) you can edit your .profile or .bashrc file (or the relevant config files for whatever shell use use) to remove it. Otherwise, you might want to do something like: alias yum='http_proxy=; yum"
    – malcolmpdx
    Commented Mar 29, 2011 at 3:10

2 Answers 2


I realise this is an old post but thought I'd post these instructions for others for future reference.

This works, link

Modify /etc/yum.conf to have the following lines included:

# The proxy server - proxy server:port number

# The account details for yum connections

That looks like an environment setting, yum's own variable is just straight proxy. Finding where it's set could be fun. Grab a look at the following files: ~/.bash_profile ~/.bashrc

If it's not coming from there (user specific) try: grep http_proxy /etc/sysconfig/* or grep http_proxy /etc/*

I would expect it most under sysconfig as that's the more typical location on CentOS for things like that (may be some benefitbenefit in using -R flag on that grep)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .