Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
Have you checked /etc/yum.conf and /etc/yum.repos.d/* for any proxy entries there? – malcolmpdx Mar 29 '11 at 3:02
like http_proxy ? – Adam Ramadhan Mar 29 '11 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 Mar 29 '11 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 Mar 29 '11 at 3:10

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
share|improve this answer

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)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.