`
cfan_haifeng
  • 浏览: 120052 次
  • 性别: Icon_minigender_1
  • 来自: 郑州
社区版块
存档分类
最新评论

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 174438359@qq.com

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

分享到:
评论
3 楼 cfan_haifeng 2015-03-12  
又莫名其妙的好了
2 楼 cfan_haifeng 2015-03-09  
另外,我的代理时断时续啊
1 楼 cfan_haifeng 2015-03-09  
日志查看:tail -f /var/log/squid/access.log

相关推荐

Global site tag (gtag.js) - Google Analytics