3

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

Adam Ramadhan
  • 173
  • 1
  • 2
  • 9
  • Have you checked /etc/yum.conf and /etc/yum.repos.d/* for any proxy entries there? – malcolmpdx Mar 29 '11 at 03:02
  • like http_proxy ? – Adam Ramadhan Mar 29 '11 at 03: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 03: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 03:10

2 Answers2

5

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
proxy=http://mycache.mydomain.com:9999

# The account details for yum connections
proxy_username=yum-user-name
proxy_password=yum-user-password
Adrian Torrie
  • 253
  • 1
  • 3
  • 11
1

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)

Twirrim
  • 673
  • 4
  • 8