How To Configure Yum Behind Authenticated Proxy Server

on December 1 | in Linux, Programming / Scripting | by | with 31 Comments

This how to describe to configure YUM to work behind proxy server using username / password for authentication. YUM is great tool available in RHEL/Fedora/CentOS to install/update/remove packages easily from local and internet repositories. In the most offices / schools / colleges where proxies are implemented and direct connection to the internet is not possible and all internet traffic goes through proxy servers. Same as in my office we have to use proxy server with username / password to authenticate ourself to get internet access. So we are going to configure my YUM software to use proxy to get my LINUX updated with new softwares all the times with repositories available on internet.

OS = Fedora 10

1) Configure yum.conf

vi /etc/yum.conf

enter following lines at bottom of [main] section


2) Export http_proxy variable

export http_proxy=”http://yourproxyaddress:80/”

3) Export http_proxy variable in bash login script

vi /root/.bash_profile

export http_proxy=”http://yourproxyaddress:80/”

This will help you to export http_proxy variable automatically everytime you login.

Now use “yum list” command to check for its working.

yum list

Enjoy Brothers 🙂

Pin It

related posts

31 Responses to How To Configure Yum Behind Authenticated Proxy Server

  1. Arunabh says:

    Thanks….good tutorials

  2. João says:

    Tanks! I have Ferdora 13!

  3. Makitox says:

    In Fedora 13 it works too =)

  4. Ronny says:

    Muchas Gracias por el dato, esta solución es factible.. ahora vamos por el postgres y el pgadmin!!

  5. Esteban says:

    En mi caso, el servidor proxy no cuenta con usuario ni password para acceder, asi que los omiti.
    La cuestion es que a la primera no funciono, solo despues de colocar, y dio error, luego volvi a poner y funciono ok.
    Pero una duda, la variable http_proxy que objetivo cumple.

  6. subrat says:

    how to configure squid proxy server in centos5

    i have installed machine now what can i do…

    Please suggest to me……

    Subrat Kumar

  7. sakey says:

    i hv used yr tutorial for fedora 11 onwards. i recently updated ma system to 15 and it is not workin. plz help me out

  8. sakey says:

    itz workin bt on other address
    thanx a lot

  9. Siju says:

    How to give windows domain username and password?

  10. Siju says:

    i tried with
    domain\username, but it never works

  11. @Siju: First you need to see whether your domain user/pass is been used to access the internet or not. As per mine in above instruction I am using it and it working absolutely fine.
    The above username i given is of Windows Domain user/pass which is same as our internet access.

    Check your settings again, you might has miss something.

  12. Immanuel says:

    thanks, worked for fedora 15. (tried a lot of methods from other blogs b4)

  13. Immanuel says:

    thanks, worked for fedora 15. (tried a lot of methods from other blogs b4 and failed)

  14. Kumar Gaurav says:

    I use bluetooth to access internet in RHEL 6.
    while installing any package using YUM i got followong error
    Setting up Install Process
    No package miro available].
    Error: Nothing to do

    pleasse tell me how to configure yum conf file for bluetooth

  15. Edi says:

    Works perfectly

  16. the error showing there is an issue with javac command of openjdk installation. Can you please reconfirm that you do have javac compiler

    /usr/local/red5/build.xml:209: The following error occurred while executing this line:
    /usr/local/red5/build.xml:230: Error running /usr/lib/jvm/java-1.6.0-openjdk- compiler

    run following command, if it shows the same path, then it exist else it will says no file found.

    ls -l /usr/lib/jvm/java-1.6.0-openjdk-


  17. saurabh says:

    Thanks a lot friend!!
    Worked on Fedora 15..

  18. Kshitij says:

    its working on most of the systems, but its not working on one of the system. Its fedora 13 only and have tried the same steps.but dont know why its not working.

  19. VIKAS says:

    Hi All,

    I tried using my domain\loginid and password but it is not working for me. Although I can access interent in firefox because it prompts for credentials.

    I am getting this error.
    [root@kick ~]# yum repolist
    Loaded plugins: downloadonly, rhnplugin, security
    Config time: 0.144
    This system is not registered with RHN.
    RHN support will be disabled.
    Yum Version: 3.2.22
    Could not retrieve mirrorlist error was
    [Errno 14] HTTP Error 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
    Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Please verify its path and try again
    [root@kick ~]#

  20. charles says:

    works without any trouble, Thanx.

  21. shahid says:

    how to configure yum n create a yum server

    i create a local reposetory but i want how to create a yum server

  22. sumit kumar says:

    Thanks…… helped a lot 😀

  23. William says:

    My proxy password contains @ and this error occurred
    14: PYCURL ERROR 5 – “Couldn’t resolve proxy ‘nalis1602@localhost'”

  24. @Williiam: You can use escape character like back slash before @ symbol like this \@ to avoid this error.

    Sohail Riaz

  25. lawrence says:


    I get folloiwing error

    base/primary_db | 365 kB 00:00 … [Errno -1] Metadata file does not match checksum
    Trying other mirror.

    wonder what setting is to be done in yum.conf file.


  26. mayank says:

    Worrked on Fedora 13
    uname -a

    Linux hope #1 SMP Thu May 6 18:27:11 UTC 2010 i686 i686 i386 GNU/Linux

  27. Souheil says:

    Good tutorial. works great !

  28. ajay says:

    it worked…thanx

  29. VIKAS says:

    I have been looking for an option to use DOMAIN\Username and password, but it does not works. Probably because I have few special chars in my password (like @ and #).


  30. says:

    Hi Sohail.

    I have a rhel 7.2 which are using multiple NIC, loopbacks interface and teaming interface. One of the loopback can goes to the internet while using direct NIC or teaming does not. How I want to make the yum using the loopbacks interface to connect to the Internet?

Leave a Reply

Your email address will not be published. Required fields are marked *

« »