How to enable Proxy Settings for Yum Command on RHEL / CentOS Servers

Pradeep Kumar

I am a huge fan of open source and love to share How To's tutorials on Linux, Cloud and DevOps. I have been working as Linux Consultant, Cloud & DevOps Engineer since 2010

You may also like...

2 Responses

  1. Juliette says:


    Thanks for your help, but I still have a bad issue when I try to execute yum.
    I configure my /etc/environment like you, try “yum update”
    and now, (as always, before my configuration), I have this error :

    There was an error communicating with RHN.
    Red Hat Satellite or RHN Classic support will be disabled.
    Error communicating with server. The message was:
    Unable to connect to the host and port specified
    [a874878adm@sma6333 etc]$

    • Hi Juliette,

      First set the proxy variables on the terminal and then try executing the commands, If you wan to use ‘/etc/environment’ file then you have to first source the file using the command:

      # source /etc/environment

Leave a Reply

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