m (1 revision(s)) |
|||
Line 55: | Line 55: | ||
Example 6. Profile Settings for a Secured Proxy Server | Example 6. Profile Settings for a Secured Proxy Server | ||
{| | {| | ||
|- | |- | ||
| {{Template:Note}} '''The <code>http_proxy</code> Environment Variable''' | | {{Template:Note}} '''The <code>http_proxy</code> Environment Variable''' | ||
Line 62: | Line 62: | ||
|} | |} | ||
{| | {| | ||
|- | |- | ||
|[[Docs/Drafts/SoftwareManagementGuide/YumCaching| Previous Page - 10. Working with yum Caching]] ||[[Docs/Drafts/SoftwareManagementGuide| Table of Contents]] ||[[Docs/Drafts/SoftwareManagementGuide/Credits| Next Page - 12. Acknowledgements]] | |[[Docs/Drafts/SoftwareManagementGuide/YumCaching| Previous Page - 10. Working with yum Caching]] ||[[Docs/Drafts/SoftwareManagementGuide| Table of Contents]] ||[[Docs/Drafts/SoftwareManagementGuide/Credits| Next Page - 12. Acknowledgements]] | ||
|} |
Revision as of 19:12, 29 May 2008
11. Using yum with a Proxy Server
By default, yum
accesses network repositories with HTTP. All yum
HTTP operations use HTTP/1.1, and are compatible with web proxy servers that support this standard. You may also access FTP repositories, and configure yum
to use an FTP proxy server. The squid
package provides a proxy service for both HTTP/1.1 and FTP connections.
11.1. Configuring Proxy Server Access
To enable all yum
operations to use a proxy server, specify the proxy server details in /etc/yum.conf
. The proxy setting must specify the proxy server as a complete URL, including the TCP port number. If your proxy server requires a username and password, specify these by adding proxy_username
and proxy_password
settings.
The settings below enable yum to use the proxy server mycache.mydomain.com
, connecting to port 3128, with the username yum-user
and the password qwerty
.
proxy=http://mycache.mydomain.com:3128 proxy_username=yum-user proxy_password=qwerty
Example 4. Configuration File Settings for Using A Proxy Server
Older versions of yum may require a "/" after the port number: proxy=http://mycache.mydomain.com:3128/
|
Global Settings |
If you define a proxy server in /etc/yum.conf , all users connect to the proxy server with those details when using yum .
|
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.
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
Previous Page - 10. Working with yum Caching | Table of Contents | Next Page - 12. Acknowledgements |