Thursday 29 May 2014

Steps to configure Proxy in CentOS 6




For yum updates, add the following line to /etc/yum.conf:

proxy=http://<proxy-server-username>:<proxy-server-password>@<proxy-server-IP>:<proxy-port>

OR

proxy=http://<proxy-server-IP>:<proxy-port>



For everything else, declare the following environment variables:

# export http_proxy=http://<proxy-server-username>:<proxy-server-password>@<proxy-server-IP>:<proxy-port>
# export https_proxy=http://<proxy-server-username>:<proxy-server-password>@<proxy-server-IP>:<proxy-port>

OR

# export http_proxy=http://<proxy-server-IP>:<proxy-port>
# export https_proxy=http://<proxy-server-IP>:<proxy-port>



For bypassing the proxy server for any IP address, add it to the environment variable no_proxy:

# export no_proxy="localhost, 127.0.0.1, 10.10.13.178, 10.10.13.196, 10.10.13.198, 10.10.13.199"


No comments:

Post a Comment