2016年6月2日 星期四

Squid3 ubuntu



Squid3 安裝


http://www.ez2o.com/Blog/Post/Ubuntu-Install-Proxy-Server-Squid


apt-get install squid

vi /etc/squid3/squid.conf

設定允許所有人連入 Proxy :

將 http_access allow localhost  改為 http_access allow all

將 http_access deny all 註解

/etc/init.d/squid restart

在 Wget 使用 proxy


Via ~/.wgetrc file:
use_proxy=yes http_proxy=127.0.0.1:8080
or
via -e options placed after the URL:
wget ... -e use_proxy=yes -e http_proxy=127.0.0.1:8080 ...

用 ftp proxy 的時候 用 -e ftp_proxy=127.0.0.1:8080


在 yum 使用 proxy



$ export http_proxy=http://proxy:3128
$ export ftp_proxy=http://proxy:3128
$ yum update
If you want to make the proxy settings permanent, you can add a proxy directive to /etc/yum.conf:
$ grep proxy /etc/yum.conf
proxy=http://proxy:3128











=END