Fedora Linux Support Community & Resources Center
  #1  
Old 30th January 2004, 08:40 AM
bopc Offline
Registered User
 
Join Date: Dec 2003
Posts: 9
RESOLVED: how to configure yum to get through proxy?

So, I've installed FC1 on my laptop which dual-boots also with XP. Now, I'm using it at work so I'm behind a proxy server. I have configured Mozilla for the proxy, and set the proxy in the Network Proxy applet (Prefs menu). I can browse the net using Moz, but yum does not seem to "see" the proxy configuration. I run yum check-update and it just sits there for a bit, then starts the failover sequence (and eventually times out looking for servers). I'm configured for DHCP. What else needs to be configured for yum to get through the proxy?

If all else fails, I can always update from home via my cable connection (525kbps), but I have 10mb connection at work so it would be nice to get updates from there too.
Reply With Quote
  #2  
Old 30th January 2004, 10:49 AM
bopc Offline
Registered User
 
Join Date: Dec 2003
Posts: 9
Ok, found the answer. First have to set the environment variable for yum:

http_proxy=proxy:portnum

Then, export the variable:

export http_proxy

Then run yum as usual. Works fine now.

Last edited by Jman; 10th April 2004 at 01:39 AM.
Reply With Quote
  #3  
Old 31st January 2004, 08:51 PM
RossCampbell Offline
Registered User
 
Join Date: Jan 2004
Posts: 1
Better answer - use /etc/profile.d/proxy.[csh,sh]

create the following files in /etc/profile.d, and then this will work in *any* shell for *any* user of the system

#proxy.sh
export http_proxy=http://host.com:port/
export ftp_proxy=http://host.com:port/
export no_proxy=.domain.com
export HTTP_PROXY=http://host.com:port/
export FTP_PROXY=http://host.com:port/

#proxy.csh
setenv http_proxy http://host.com:port/
setenv ftp_proxy http://host.com:port/
setenv no_proxy .domain.com
setenv HTTP_PROXY http://host.com:port/
setenv FTP_PROXY http://host.com:port/

Last edited by Jman; 10th April 2004 at 01:39 AM.
Reply With Quote
  #4  
Old 2nd February 2004, 02:39 PM
cybrjackle Offline
Registered User
 
Join Date: Jan 2004
Posts: 456
I just add the following to bash_profile for my main user

# vi ~/.bash_profile

export http_proxy=http://ip:port

And use sudo for the user so I don't have to type anything to get yum to run everday at work.

Last edited by Jman; 10th April 2004 at 01:39 AM.
Reply With Quote
  #5  
Old 2nd February 2004, 07:25 PM
vorte[x] Offline
Registered User
 
Join Date: Mar 2004
Posts: 155
Can a mod or the original creator of this thread prefix the subject line with "Resolved:" - Makes things a whole lot easier when trying to find people with unresolved issues.
Reply With Quote
  #6  
Old 13th February 2004, 10:48 PM
joking Offline
Registered User
 
Join Date: Feb 2004
Posts: 25
How to configure yum to get through a proxy

Well, that didn't work. Before I changed what was said needed to be changed or added I saw a red dot with an exclaimation point in it. When I pointed to it it said I had 124 updates waiting. Then when I clicked on the dot it would show the packages needing updating.

After making the changes. I logged out and then logged back in.

Now I have a blue dot with a check mark. It says Waiting for first checkin when I point at it and when I click on it it doesn't show anything at all.

I guess, I'll un-change what I did and reboot. And see if I can get back to the partial expected update recognition.

This is result of "yum update"

[root@home rhn]# yum update
Gathering header information file(s) from server(s)
Server: Fedora Core 1 - i386 - Base
retrygrab() failed for:
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/1/i386/headers/headers/header.info
Executing failover method
failover: out of servers to try
Error getting file http://download.fedora.redhat.com/pub/fedora/linux/core/updates/1/i386/headers/headers/header.info
[Errno 4] IOError: HTTP Error 404: Not Found
[root@home rhn]#

at least now I am getting Errno 4 instead of Errno 7,
Reply With Quote
  #7  
Old 9th April 2004, 04:44 PM
JMR Offline
Registered User
 
Join Date: Apr 2004
Posts: 1
how to configure yum to get through proxy

Anyone have a fix for this yet? I also get a 404 error after setting the http_proxy variable.

FWIW, it's not a Yum issue. I get the same error using wget.

Jack
Reply With Quote
  #8  
Old 10th April 2004, 01:41 AM
Jman Offline
Registered User
 
Join Date: Mar 2004
Location: Minnesota, USA
Age: 28
Posts: 7,909
Smilies disabled in certain posts, much more readable now.

Not that I don't like smilies.
Reply With Quote
  #9  
Old 10th June 2004, 12:16 PM
NathanH Offline
Registered User
 
Join Date: Jun 2004
Location: New Zealand
Age: 41
Posts: 1
Thumbs up edit /etc/wgetrc

I had the same problem. I fixed it by editing /etc/wgetrc and edited the following:

# Many sites are behind firewalls that do not allow initiation of
# connections from the outside. On these sites you have to use the
# `passive' feature of FTP. If you are behind such a firewall, you
# can turn this on to make Wget use passive FTP by default.
passive_ftp = on

# You can set the default proxies for Wget to use for http and ftp.
# They will override the value in the environment.
http_proxy = http://host:port/
ftp_proxy = http://host:port/

You need to remove the comment (#) at the beginning of the last 2 lines shown here and at the beginning of the line containing passive_ftp.

HTH,
Nathan

Last edited by NathanH; 10th June 2004 at 01:40 PM.
Reply With Quote
  #10  
Old 25th October 2004, 04:17 PM
leo.dearden Offline
Registered User
 
Join Date: Oct 2004
Posts: 1
Exclamation NB: use a complete URL

Quote:
Originally Posted by bopc
Ok, found the answer. First have to set the environment variable for yum:

http_proxy=proxy:portnum

Then, export the variable:

export http_proxy

Then run yum as usual. Works fine now.
Something to note:

the URL that you use for 'proxy' has to be a complete URL. Specifically, you need to use (say):

http_proxy=http://proxy.foo.com:8888

instead of

http_proxy=proxy.foo.com:8888

The latter works with wget, but causes the python urllibs to break, since they expect the protocol type to be at the start of the URL.

This one had me scratching my head for a while ^_^

HTH,

Leo.
Reply With Quote
  #11  
Old 4th November 2004, 12:12 PM
aussieaubs Offline
Registered User
 
Join Date: Oct 2004
Posts: 7
Thumbs up

I thought I would just add that if you need to authenticate to your proxy and need to add a user id and password you will need to follow the following format:

http_proxy=http://user:passwd@proxy.foo.com:portnumber

and follow the same format with the other proxy variables (ftp_proxy etc). I know its not safe but i havent found a work around yet.... yum wont allow for password authentication...

Cheers
Ah-ha
__________________
Finding the answer is really only a half solved problem, getting it to work is the other half.... :D

Last edited by aussieaubs; 4th November 2004 at 12:22 PM.
Reply With Quote
  #12  
Old 15th November 2004, 04:47 AM
zabilcm Offline
Registered User
 
Join Date: Sep 2004
Posts: 18
For people using a windows proxy

For people behind a windows proxy which uses NTLM authentication this link will help.

http://ntlmaps.sourceforge.net/

The above program should be run as a proxy on your desktop and all your connections should be directed through this.
Reply With Quote
  #13  
Old 18th May 2005, 01:53 PM
jmellor Offline
Registered User
 
Join Date: Apr 2005
Location: Kitchener, Ontario, Canada
Age: 59
Posts: 4
How to specify a domain in the user authentication?

I can't seem to get the proxy to work at all.

I think the problem is that I need the ability to pass a Microsoft domain as well as the Microsoft username and password to the proxy to do the authentication. Any ideas?
Reply With Quote
  #14  
Old 26th August 2005, 04:18 PM
Mr.GoodBoy Offline
Registered User
 
Join Date: Aug 2005
Location: Kharagpur
Posts: 2
I am connected to college lan(T1) my direct connection is not working so tried above.my proxies are firewalled
Code:
 http_proxy=http://144.16.192.245:8080
  export http_proxy 
[root@localhost ~]# yum install valknut
Setting up Install Process
Setting up repositories
http://ayo.freshrpms.net/fedora/linux/4/i386/core/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (111, 'Connection refused')>
Trying other mirror.
Cannot open/read repomd.xml file for repository: core
failure: repodata/repomd.xml from core: [Errno 256] No more mirrors to try.
please help me how to solve this i am new to linux so explain in detail

previously i was trying to configure and get the gpg key there i have created files and got struck up at
like this
Code:
[root@localhost ~]# rpm --import --httpproxy http://144.16.192.245 --httpport 80 80 --ftpproxy http://144.16.192.245 --ftpport 8080  http://dag.wieers.com/packag es/RPM-GPG-KEY.dag.txt
error: http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt: import read failed(-1 ).
Segmentation fault
so i changed the gpgcheck to 0 as suggested by some one and got the above error in yum
please tell me how and what to configure i am new to linux and got fc4
frusttrated of these installations and dependencies
Reply With Quote
  #15  
Old 3rd September 2005, 09:16 PM
coolmohitz Offline
Registered User
 
Join Date: Jan 2005
Posts: 8
Just copy paste this in your .bashrc and invoke it by the command proxy
This is a secure authentication method:

function proxy(){
echo -n "username:"
read -e username
echo -n "password:"
read -es password
export http_proxy="http://$username:$password@proxy: port/"
export ftp_proxy="http://$username:$password@proxy: port/"
}

Last edited by coolmohitz; 24th December 2005 at 11:05 AM.
Reply With Quote
Reply

Tags
configure, proxy, resolved, yum

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I configure Fedora 7 to go through proxy? youhaodeyi Using Fedora 1 29th July 2007 01:40 PM
How do I configure Fedora 7 go through proxy? youhaodeyi Using Fedora 1 26th July 2007 02:34 AM
FC 2 configure yum/up2date to get through a proxy griguolin Servers & Networking 0 27th October 2004 11:42 PM


Current GMT-time: 05:34 (Friday, 25-04-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat