• rhel5 (AS5) 上配置 Squid


    测试环境:RedHat Linux Enterprise 5 + LAN

    最简单配置(任意局域网用户都可以连接):

    --------------------------------------------------

    http_port 服务器IP:8080
    cache_mem 64 MB
    cache_dir ufs /var/spool/squid 4096 16 256
    cache_effective_user squid
    cache_effective_group squid
    dns_nameservers DNS服务器IP
    cache_access_log /var/log/squid/access.log
    cache_log /var/log/squid/cache.log
    cache_store_log /var/log/squid/store.log
    visible_hostname 服务器IP
    cache_mgr 管理员邮箱地址

    acl all src 0.0.0.0/0.0.0.0
    http_access allow all

    --------------------------------------------------

    透明代理配置:

    1.添加以下配置命令

    --------------------------------------------------

    httpd_accel_host virtual
    httpd_accel_port 80
    httpd_accel_with_proxy on
    httpd_accel_uses_host_header on

    --------------------------------------------------

    2.用 iptables 实现端口转接

    用户口令配置:

    1.添加以下配置命令

    --------------------------------------------------

    auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd
    auth_param basic children 5
    auth_param basic credentialsttl 2 hours
    auth_param basic realm Example.com's Squid proxy-caching
    acl auth_user proxy_auth REQUIRED
    http_access allow auth_user

    --------------------------------------------------

    2.用Apache工具生成用户口令/密码文件

  • 相关阅读:
    分页插件PageHelper
    持久层的具体实现
    SSM框架搭建
    mysql库中建立存储过程
    安装python2.7
    Spark应用程序第三方jar文件依赖解决方案
    spark2.0.1源码编译
    Hadoop2.7.3源码编译
    Hadoop2.x伪分布式环境搭建(一)
    Linux基础环境的各项配置(三)
  • 原文地址:https://www.cnblogs.com/exclm/p/1395783.html
Copyright © 2020-2023  润新知