Last active
August 29, 2015 14:04
-
-
Save archerslaw/3d91b27799d134b6092b to your computer and use it in GitHub Desktop.
Using yum with a Proxy Server.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.Refer to the man page for yum.conf for information on HTTP settings that may be modified for compatibility with nonstandard web proxy servers. | |
2.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. | |
e.g.:http://squid.corp.redhat.com:3128 | |
# vim /etc/yum.conf | |
# The proxy server - proxy server:port number | |
proxy=http://URL:PORT | |
# The account details for yum connections(optional) | |
proxy_username=YOUR-PROXY-USERNAME | |
proxy_password=YOUR-PROXY-PASSWORD | |
... | |
3.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. | |
# The Web proxy server used by this account | |
http_proxy="http://URL:PORT" | |
export http_proxy | |
OR # cat /etc/profile.d/proxy.sh | |
export http_proxy="squid.corp.redhat.com:3128" | |
export ftp_proxy="squid.corp.redhat.com:3128" | |
export HTTP_PROXY="squid.corp.redhat.com:3128" | |
export FTP_PROXY="squid.corp.redhat.com:3128" | |
export no_proxy=".localdomain.com" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment