FedoraForum.org - Fedora Support Forums and Community
Page 1 of 4 1 2 3 ... LastLast
Results 1 to 15 of 63

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    bopc Guest

    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.

  2. #2
    bopc Guest
    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.

  3. #3
    leo.dearden Guest

    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.

  4. #4
    aussieaubs Guest

    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
    Last edited by aussieaubs; 4th November 2004 at 01:22 PM.

  5. #5
    zabilcm Guest

    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.

  6. #6
    raye Guest
    Quote Originally Posted by zabilcm
    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.
    Did this work for anyone?

  7. #7
    sighs Guest
    Hello,
    I have tried the environment variable approach and get:

    http://download.fedora.redhat.com/pu...ta/repomd.xml: [Errno 4] IOError: HTTP Error 407: Server: Microsoft-IIS/4.0
    Date: Mon, 26 Sep 2005 14:52:53 GMT
    Connection: close
    Proxy-Authenticate: NTLM
    Trying other mirror.
    Cannot open/read repomd.xml file for repository: updates-released
    failure: repodata/repomd.xml from updates-released: [Errno 256] No more mirrors to try.

    I have tried this with both the domain\username and username in the env var, same result. I have also tried the proxy.sh/proxy.csh suggestion in the post. Our proxy server is MS Proxy 2, not a good start. Any ideas?

    Cheers, Sighs.

  8. #8
    Join Date
    Jan 2005
    Posts
    35
    Quote Originally Posted by bopc
    Ok, found the answer. First have to set the environment variable for yum:

    http_proxy=proxyortnum

    Then, export the variable:

    export http_proxy

    Then run yum as usual. Works fine now.
    This worked for my situation, but I had to use the following modification as our proxy requires authentication:

    http_proxy=http://usernameassword@myproxyserver.mydomain.com

    Thank you for your post, and for the other member who mentioned adding the username and password variables.

  9. #9
    nosupport Guest
    I'm having the exact opposite problem. I used to use a proxy server, and I forgot how i had it setup. Now I need to find that setting and get rid of it because its driving my crazy having to 'export http_proxy=' every time before i 'yum'. Where I have it set seems to be the ultimate end-all place to set a proxy. If I find it, I will post here. At the moment I'm left to scratch my head and am going to try to find some way to search inside all files on the server for the ip address that '$http_proxy' is evaluating to.

  10. #10
    RossCampbell Guest

    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.

  11. #11
    Zabby Guest

    Perfect, thanks

    Quote Originally Posted by RossCampbell
    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.comort/
    export ftp_proxy=http://host.comort/
    export no_proxy=.domain.com
    export HTTP_PROXY=http://host.comort/
    export FTP_PROXY=http://host.comort/

    #proxy.csh
    setenv http_proxy http://host.comort/
    setenv ftp_proxy http://host.comort/
    setenv no_proxy .domain.com
    setenv HTTP_PROXY http://host.comort/
    setenv FTP_PROXY http://host.comort/
    Work Perfectly for me; first time round. Only I redirected this through Your Freedom i.e. localhost:8080

  12. #12
    Join Date
    Sep 2009
    Posts
    2
    Quote Originally Posted by RossCampbell
    create the following files in /etc/profile.d, and then this will work in *any* shell for *any* user of the system
    Thanks, mate, works fine on my Fedora 10!

  13. #13
    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.

  14. #14
    vorte[x] Guest
    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.

  15. #15
    joking Guest

    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,

Page 1 of 4 1 2 3 ... LastLast

Similar Threads

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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •