Product SiteDocumentation Site

11.2. Configuring Proxy Server Access for a Single User

To enable proxy access for a specific user, add the lines in the example box below to the user's shell profile. For the default bash shell, the profile is the file ~/.bash_profile. The settings below enable yum to use the proxy server mycache.mydomain.com, connecting to port 3128.
# The Web proxy server used by this account 
http_proxy="http://mycache.mydomain.com:3128" 
export http_proxy
Example 5. Profile Settings for Using a Proxy Server

If the proxy server requires a username and password, add these to the URL. To include the username yum-user and the password qwerty, add these settings:
# The Web proxy server, with the username and password for this account 
http_proxy="http://yum-user:qwerty@mycache.mydomain.com:3128" 
export http_proxy
Example 6. Profile Settings for a Secured Proxy Server

The http_proxy Environment Variable

The http_proxy environment variable is also used by curl and other utilities. Although yum itself may use http_proxy in either upper-case or lower-case, curl requires the name of the variable to be in lower-case.