Wednesday, July 20, 2011

yum behind proxy

1) Configure yum.conf

vi /etc/yum.conf
enter following lines at bottom of [main] section
proxy=http://yourproxyaddress:port/
proxy_username=youruser
proxy_password=yourpassword

2) Export http_proxy variable

export http_proxy=”http://username:password@yourproxyaddress:3128/”

3) Export http_proxy variable in bash login script

vi /root/.bash_profile
export http_proxy=”http://username:password@yourproxyaddress:3128/”
This will help you to export http_proxy variable automatically everytime you login.
Now use “yum list” command to check for its working.
yum list

No comments:

Post a Comment