linux-squid 配置安装

       由于工作原因不少同事需要访问www.google.comhttp://www.facebook.com/。恰好收里又有一台相关服务器(CentOS release 5.10 (Final)),所以就决定做个代理服务器来解决这件事情了。步骤如下:

 

1.执行“rpm -qa|grep squid” 判断是否已经按照了squid。

2.如果没有,则执行“yum install squid”进行安装,我这里安装的版本是 Version 2.6.STABLE21

3.执行“service squid start”,但发现无法启动

4.执行“hostname”,发现为“MyServer”,所以在“/etc/squid/squid.conf” 的末尾添加“visible_hostname MyServer”(没有"号),重启成功。

5.IE配置代理后发现无法访问,如"Access Denied."等。搜搜,打开“/etc/squid/squid.conf” ,注释掉"http_access deny all",并添加 

http_port 3128 #注意http_port 这个也不要搞重复啊

visible_hostname MyServer

cache_mgr [email protected]

acl all src 0.0.0.0/0.0.0.0

#never_direct deny local-servers

#never_direct allow all

http_access allow all

 

6.重启ok

猜你喜欢

转载自sunfish.iteye.com/blog/2190682