Centos:Yum behind a proxy

if your servers are behind a proxy and you need to provide username and password for the proxy server , then you need to configure yum.conf file with bellow syntax

http_proxy=http://username:password@proxyaddress:port/
proxy_username=username
proxy_password=password
<pre lang="GNU">
 
if you dont need to provide username and password for proxy server then :
<pre lang="GNU">
http_proxy=http://proxyserveraddress:port/
 
<pre lang="GNU">
also  add bellow lines into .bashrc file
 
<pre lang="GNU">
http_proxy="http://proxyserveraddress:3128"
export http_proxy

Leave a Reply

*