Squid部署文档一

一. 网络环境

1. 设备条件:squid代理服务器一台(内网,Eth0:218.29.30.31/24,Eth1:192.168.1.1/24),客户机至少一台(内网,IP:192.168.1.100),web服务器(放在互联网上,IP:218.29.30.29/24)

2. 安装软件包squid-3.1.10-1.el6.i686

配置好yum,实现yum自动安装,在前面没有用的文件首行加#注释,命令为:%s/^/#/g

[root@kingmacro ~]#vim /etc/yum.repos.d/rhel-source.repo

#[rhel-source]

#name=Red Hat Enterprise Linux $releasever - $basearch - Source

#baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/SRPMS/

#enabled=0

#gpgcheck=1

#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

#

#[rhel-source-beta]

#name=Red Hat Enterprise Linux $releasever Beta - $basearch - Source

#baseurl=ftp://ftp.redhat.com/pub/redhat/linux/beta/$releasever/en/os/SRPMS/

#enabled=0

#gpgcheck=1

#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[wanghong]

Name=999

baseurl=file:///mnt/Server

enabled=1

gpgcheck=0

[root@kingmacro ~]#yum –y install squid

3.配置squid.conf文件

[root@kingmacro ~]#vim /etc/squid/squid.conf

http_access allow manager localhost

http_access deny manager

# Deny requests to certain unsafe ports

http_access deny !Safe_ports

# Deny CONNECT to other than secure SSL ports

http_access deny CONNECT !SSL_ports

# We strongly recommend the following be uncommented to protect innocent

# web applications running on the proxy server who think the only

# one who can access services on "localhost" is a local user

#http_access deny to_localhost

#

# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS

#

# Example rule allowing access from your local networks.

# Adapt localnet in the ACL section to list your (internal) IP networks

# from where browsing should be allowed

http_access allow localnet

http_access allow localhost

# And finally deny all other access to this proxy

http_access allow all

# Squid normally listens to port 3128

http_port 3128

# We recommend you to use at least the following line.

hierarchy_stoplist cgi-bin ?

# Uncomment and adjust the following to add a disk cache directory.

#cache_dir ufs /var/spool/squid 100 16 256

# Leave coredumps in the first cache dir

coredump_dir /var/spool/squid

# Add any of your own refresh_pattern entries above these.

refresh_pattern ^ftp: 1440 20% 10080

refresh_pattern ^gopher: 1440 0% 1440

refresh_pattern -i (/cgi-bin/|\?) 0 0% 0

4.启动squid服务

[root@kingmacro ~]#squid –D 或者使用命令 service squid start

注意:如果发现服务起动失败,请清理缓存目录,依然无法启动的话,杀死进程,再重新启squid服务

5.开始web服务器上httpd服务

[root@kingmacro ~]#service httpd start

[root@kingmacro ~]#service iptables stop

6.配置内网客户端代理

7.测试squid代理

直接开起客户端192.168.1.100浏览器输入http://218.29.30.29,看能否正常访问web服务

转载于:https://blog.51cto.com/kingmacro/812701

Squid部署文档一相关推荐

  1. Varnish安装部署文档

    简述:Varnish是一款高性能的开源HTTP加速器,挪威最大的在线报纸 Verdens Gang 使用3台Varnish代替了原来的12台Squid,性能比以前更好. 系统环境: CentOS re ...

  2. loganalyzer部署文档-(第一部分)

    loganalyzer部署文档 环境准备: 简介 LogAnalyzer 是一款syslog日志和其他网络事件数据的Web前端.它提供了对日志的简单浏览.搜索.基本分析和一些图表报告的功能.数据可以从 ...

  3. Pentaho部署文档校验过程中遇到的一些问题和解决对策

    为什么80%的码农都做不了架构师?>>>    Pentaho部署文档校验过程中遇到的一些问题和解决对策 1.quartz.EmbeddedQuartzSystemListener发 ...

  4. Docker部署文档

    Docker部署文档 目录 Docker部署文档 1 一.什么是Docker 3 1.1Docker简介 3 1.2对比传统虚拟机总结 4 1.3Docker通常用于如下场景: 5 1.4基本概念 5 ...

  5. Django+Linux+Uwsgi+Nginx项目部署文档

    Django+Linux+Uwsgi+Nginx项目部署文档 WSGI 在生产环境中使用WSGI作为python web的服务器 WSGI:全拼为Python Web服务器网关接口,Python We ...

  6. Blog_mini完整部署文档

    为了使广大朋友能够使用上开源博客系统Blog_mini,作者撰写了非常详细的部署文档,涵盖在CentOS与Ubuntu上的详细部署方案,力求:只要看了部署文档,就一定可以把Blog_mini成功部署! ...

  7. 部署文档撰写经验分享

    2011年,公司调我和几个同事去广西,与现场的同事一起撰写部署文档.去之前还感觉领导有点小题大做,写个部署文档至于么?我在公司半天就能写出一版了,还叫这么多人跑到广西写这个,真是崽卖爷田不心疼,公司费 ...

  8. Redis集群部署文档(Ubuntu15.10系统)

    Redis集群部署文档(Ubuntu15.10系统) (要让集群正常工作至少需要3个主节点,在这里我们要创建6个redis节点,其中三个为主节点,三个为从节点,对应的redis节点的ip和端口对应关系 ...

  9. JAVA微信开源项目(jeewx)百度BAE 部署文档

    JeeWx(捷微) 百度BAE 部署文档 开始前的准备 1. WAR包 下载地址: 链接: http://pan.baidu.com/s/1bnlcsk3 密码: 592i 下载war包和sql脚本文 ...

最新文章

  1. Flume-0.9.4数据插入HBase-0.96
  2. Docker安装Tomcat、MySQL和Redis
  3. 企业网络推广——企业网络推广专员如何预估网站优化流量的增长?
  4. 数据链路层差错控制——奇偶校验码、循环冗余码和汉明码(海明码)
  5. myeclipse导入项目报错Target runtime Apache Tomcat v8.0 is not defined
  6. C语言运算符的优先级及结合性
  7. 公有云 私有云 混合云_您需要了解的有关混合云的知识
  8. 学习SQL 的网址集合
  9. Linux的dev目录被删除,详解Linux系统下的/dev目录
  10. jdk的官方下载地址
  11. 简单6步,手把手搭建MinDoc文档库
  12. word批量调整图片大小--宏
  13. 平面设计什么情况下会用到对比构图与调和构图
  14. leetcode.1024. 视频拼接
  15. 我的世界服务器如何修改头像,我的世界单机模式怎么换头像
  16. Java爬去教务系统后怎么发布_java实现-强智教务系统API文档-课程信息
  17. 山外K66连接TLL注意事项
  18. 人形机器人视觉处理——走迷宫
  19. [从头读历史] 第246节 夏商与西周
  20. j计算机屏幕关闭时间,win7如何设置自动关闭电脑屏幕的时间?

热门文章

  1. FastJson序列化Json自定义返回字段,普通类从spring容器中获取bean
  2. 《简明电路分析》——1.6节简单电路分析实例
  3. mysql5.7忘记root密码的修改方法
  4. 基于Log4net插件
  5. 点击屏幕上EditText区域以外的任何地方隐藏键盘的解决方法
  6. Android中蓝牙的基本使用
  7. ServerSocket01
  8. 禁止输入emoji表情
  9. IIS服务器五大安全要素
  10. tomcat WARNING [ContainerBackgroundProcessor[StandardEngine[Catalina]]]