Find knowledge base article(s) by searching for keywords in the title e.g. type linux in the search box below
Find knowledge base article(s) by browsing the subject categories of articles
Technology quick references, cheatsheets, user manuals etc.
Shop Online through ShopifyLite
Tutorials on various IT applications.
Search Title    (UL:0 |SS:f)

Software >> OS >> Unix >> Linux >> Package Managers >> yum >> How to configure yum to connect to repository via a proxy server

 

How do I use a yum server if my system is behind a proxy server?

A: To configure yum to use a proxy for all users on a systen, add your proxy server details to /etc/yum.conf. Note that both a http://or https:// prefix and TCP port are required.

     proxy=http://proxy.mydomain.com:8080

If your proxy server requires authentication, add these settings to /etc/yum.conf:

      proxy_username=<proxy username>
      proxy_password=<proxy password>

To configure a proxy server for a single user or session, set the https_proxy or http_proxy environment variable and optionally add these settings to ~/.bash_profile. Note that a protocol prefix is optional:

      https_proxy=proxy.mydomain.com:8080
      export https_proxy

If you've configured proxy settings for a non-root user or session only, remember that many yum commands require root privileges. So, when using sudo, you must use -E to preserve the existing environment. For example:

      sudo -E yum install <some package>
[ © 2008-2021 myfaqbase.com - A property of WPDC Consulting ]