Friday, August 9, 2013

Configuring Web Proxy on CentOS

If your internet connection is behind a web proxy, you need to configure the following on your CentOS server:

System-wide proxy settings - add the following lines to your /etc/environment file:
# vi /etc/environment

http_proxy="http://proxysrv:8080/"
https_proxy="https://proxysrv:8080/"
ftp_proxy="ftp://proxysrv:8080/"
no_proxy=".mylan.local,.domain1.com,host1,host2"

To apply these settings without restarting the machine run the following commands on the bash shell:
export http_proxy="http://proxysrv:8080/"
export https_proxy="https://proxysrv:8080/"
export ftp_proxy="ftp://proxysrv:8080/"
export no_proxy=".mylan.local,.domain1.com,host1,host2"

You also need to configure yum:
# vi /etc/yum.conf

proxy=http://proxysrv:8080/

10 comments:

  1. Remove the ending / in the yum.conf line. yum did not work with it on the proxy line.
    Should be like proxy=http://proxysrv:8080

    ReplyDelete
    Replies
    1. for me, on CentOS 6.5, it's working with the trailing slash character also.

      Delete
  2. Can you explain in brief, i am also finding very difficult to install in proxy. Singapore

    ReplyDelete
  3. These proxies are good some time you can say that these are goldmines Techubi

    ReplyDelete
  4. I am very happy to discover your post as it will become on top in my collection of favorite blogs to visit. Microleaves

    ReplyDelete
  5. That is why selling advertising campaigns marketing so that you could invaluable explore previous advertisment. Quite simply to jot down stronger set that fit this description. VPN For UK IP Address

    ReplyDelete
  6. Thank you for introducing CentOS...I used it to try in my work at orthopedic hospitals.

    ReplyDelete
  7. Bit Pak hosting is an integral part of your online business strategy; you should consider the quality of your website hosting provider and have in your mind the potential for scalability and growth. In my experience the customer support should be the service sector that you aim to excel at; this creates happy customers and returning clients.

    ReplyDelete