From Fedora Project Wiki
m (1 revision(s))
m (Docs/Drafts/AdministrationGuide/ManagingSoftware/YumProxy moved to Archive:Docs/Drafts/AdministrationGuide/ManagingSoftware/YumProxy: This page references a newer draft version. Archiving old page tree then I'll go back and redirect to the new.)
 
(One intermediate revision by one other user not shown)
Line 3: Line 3:
By default, <code>yum</code> accesses network repositories with HTTP. All <code>yum</code> 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 <code>yum</code> to use an FTP proxy server. The <code>squid</code> package provides a proxy service for both HTTP/1.1 and FTP connections.
By default, <code>yum</code> accesses network repositories with HTTP. All <code>yum</code> 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 <code>yum</code> to use an FTP proxy server. The <code>squid</code> package provides a proxy service for both HTTP/1.1 and FTP connections.


{| border="1"
{{Admon/tip | Modifying <code>yum</code> for Network Compatibility | Refer to the <code>man</code> page for <code>yum.conf</code> for information on HTTP settings that may be modified for compatibility with nonstandard web proxy servers. Alternatively, configure <code>yum</code> to use an FTP proxy server, and access repositories that support FTP. The Fedora repositories support both HTTP and FTP.}}
|-
| {{Template:Tip}} '''Modifying <code>yum</code> for Network Compatibility'''
|-
| Refer to the <code>man</code> page for <code>yum.conf</code> for information on HTTP settings that may be modified for compatibility with nonstandard web proxy servers. Alternatively, configure <code>yum</code> to use an FTP proxy server, and access repositories that support FTP. The Fedora repositories support both HTTP and FTP.
|}


== Configuring Proxy Server Access ==
== Configuring Proxy Server Access ==
Line 24: Line 19:
Example 4. Configuration File Settings for Using A Proxy Server
Example 4. Configuration File Settings for Using A Proxy Server


{| border="1"
{{Admon/note | Global Settings | If you define a proxy server in <code>/etc/yum.conf</code>, all users connect to the proxy server with those details when using <code>yum</code>.}}
|-
| {{Template:Note}} '''Global Settings'''
|-
| If you define a proxy server in <code>/etc/yum.conf</code>, all users connect to the proxy server with those details when using <code>yum</code>.
|}


== Configuring Proxy Server Access for a Single User ==
== Configuring Proxy Server Access for a Single User ==
Line 50: Line 40:
Example 6. Profile Settings for a Secured Proxy Server
Example 6. Profile Settings for a Secured Proxy Server


{| border="1"
{{Admon/note | The <code>http_proxy</code> Environment Variable | The <code>http_proxy</code> environment variable is also used by <code>curl</code> and other utilities. Although <code>yum</code> itself may use <code>http_proxy</code> in either upper-case or lower-case, <code>curl</code> requires the name of the variable to be in lower-case.}}
 
{|
|-
|-
| {{Template:Note}} '''The <code>http_proxy</code> Environment Variable'''
|[[Docs/Drafts/AdministrationGuide/ManagingSoftware/YumCaching | Previous Page - Working with yum Caching]] || [[Docs/Drafts/AdministrationGuide/ManagingSoftware | Table of Contents]]
|-
| The <code>http_proxy</code> environment variable is also used by <code>curl</code> and other utilities. Although <code>yum</code> itself may use <code>http_proxy</code> in either upper-case or lower-case, <code>curl</code> requires the name of the variable to be in lower-case.
|}
|}
{| border="1"
|-
|[http://fedoraproject.org/wiki/Docs/Drafts/AdministrationGuide/ManagingSoftware/YumCaching Previous Page - Working with yum Caching] ||[http://fedoraproject.org/wiki/Docs/Drafts/AdministrationGuide/ManagingSoftware Table of Contents]

Latest revision as of 17:48, 4 March 2009

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.

Modifying yum for Network Compatibility
Refer to the man page for yum.conf for information on HTTP settings that may be modified for compatibility with nonstandard web proxy servers. Alternatively, configure yum to use an FTP proxy server, and access repositories that support FTP. The Fedora repositories support both HTTP and FTP.

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

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.

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

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.
Previous Page - Working with yum Caching Table of Contents