How To Configure Yum Behind Authenticated Proxy Server

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

proxy=http://yourproxyaddress:port/
proxy_username=youruser
proxy_password=yourpassword

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 🙂

Related Posts

31 thoughts on “How To Configure Yum Behind Authenticated Proxy Server

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

  2. 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 10.11.12.9:8080, y dio error, luego volvi a poner http://10.11.12.9:8080/ y funciono ok.
    Pero una duda, la variable http_proxy que objetivo cumple.
    Gracias

  3. how to configure squid proxy server in centos5

    i have installed machine now what can i do…

    Please suggest to me……

    Thanks,
    Subrat Kumar
    9953234836

  4. 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

  5. @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.
    ——————
    Regards,

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

  7. 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
    [root@localhost~]#

    pleasse tell me how to configure yum conf file for bluetooth

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

    BUILD FAILED
    /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-1.6.0.0.x86_64/bin/javac 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-1.6.0.0.x86_64/bin/javac

    ———
    Regards,

  9. 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.

  10. 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
    Configuration
    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 http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=i386 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 ~]#

  11. how to configure yum n create a yum server

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

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

  13. Thanks
    Worrked on Fedora 13
    uname -a

    Linux hope 2.6.33.3-85.fc13.i686.PAE #1 SMP Thu May 6 18:27:11 UTC 2010 i686 i686 i386 GNU/Linux

  14. 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 #).

    Regards,
    Vikas

  15. 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 *