注册本站  论坛  繁體中文

电脑技巧
手机 | MP3 | MP4 | 显卡 | 主板 | 显示器 | 光存储 | 笔记本 | 网络设备 | 移动存储 | 数码相机
键鼠 | CPU | 音箱 | GPS | 电视 | 服务器 | 投影机 | 机箱电源 | 品牌电脑 | 办公打印 |
| 网站首页 | Cisco | Windows | Linux | Java | Dotnet | Oracle | 网页设计 | 平面设计 | 安全 | 软件应用 | 电脑维修 | 办公维修 |
您现在的位置: 电脑技巧 >> Linux >> Unix >> Linux正文

squid13+solaris10 反向代理配置全攻略

文章来源:中国IT实验室收集整理 作者:佚名 更新时间:2007-7-7 【 】 【加入收藏

1,准备工作:Solaris10,squid-2.6.STABLE13
2,开始安装和配置:

1) 查看和修改最大连接数:
  #ulimit -a
core file size        (blocks, -c) unlimited
data seg size         (kbytes, -d) unlimited
file size             (blocks, -f) unlimited
open files                    (-n) 65536
pipe size          (512 bytes, -p) 10
stack size            (kbytes, -s) 8480
cpu time             (seconds, -t) unlimited
max user processes            (-u) 8485
virtual memory        (kbytes, -v) unlimited

修改:vi /usr/include/sys/types.h

#define FD_SETSIZE 10240
#ifndef _SYS_TYPES_H
#define _SYS_TYPES_H

2)将squid软件解压和安装到制定目录:
   ./configure --prefix=/usr/local/squid --disable-internal-dns --enable-useragent-log --enable-referer-log(可以看到连接数已经修改为10240)
   make;make install;
3)在squid.conf文件里修改配置:
   vi /usr/local/squid/etc/squid.conf

   增加和修改的部分:
   http_port 80 accel vhost
   hierarchy_stoplist cgi-bin ?
   acl QUERY urlpath_regex cgi-bin \?
   cache deny QUERY
   acl apache rep_header Server ^Apache
   broken_vary_encoding allow apache
   cache_mem 1024 MB
   cache_dir ufs /export/home/squid/cache 4000 16 256
   access_log /export/home/squid/logs/access.log squid
   cache_log /export/home/squid/logs/cache.log
   cache_store_log /export/home/squid/logs/store.log
   pid_filename /export/home/squid/logs/squid.pid
   cache_dns_program /usr/local/squid/libexec/dnsserver
   dns_children 10
   hosts_file /etc/hosts
   refresh_pattern ^ftp:           1440    20%     10080
   refresh_pattern ^gopher:        1440    0%      1440
   refresh_pattern .jsp            0       20%     0
   refresh_pattern .               0       20%     2
   acl acceleratedHostSCUT dstdomain .abc.com

   acl acceleratedProtocol protocol HTTP
   acl acceleratedPort port 80

   acl all src 0.0.0.0/0.0.0.0
   acl manager proto cache_object
   acl localhost src 127.0.0.1/255.255.255.255
   acl to_localhost dst 127.0.0.0/8
   acl SSL_ports port 443
   acl Safe_ports port 80          # http
   acl Safe_ports port 21          # ftp
   acl Safe_ports port 443         # https
   acl Safe_ports port 70          # gopher
   acl Safe_ports port 210         # wais
   acl Safe_ports port 1025-65535  # unregistered ports
   acl Safe_ports port 280         # http-mgmt
   acl Safe_ports port 488         # gss-http
   acl Safe_ports port 591         # filemaker
   acl Safe_ports port 777         # multiling http
   acl CONNECT method CONNECT
   http_access allow acceleratedProtocol acceleratedPort acceleratedHostABC

http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny all
http_reply_access allow all
icp_access allow all
visible_hostname webcache3.abc.com
logfile_rotate 10
always_direct allow acceleratedHostABC

coredump_dir /export/home/squid/cache

  • 上一篇Linux:

  • 下一篇Linux:
  • 最 新 热 门
     VMware下Linux与真实主机共享上网
     Linux系统安全隐患及加强安全管理方法
     各类Unix和Linux密码丢失解决方法
     配置Linux操作系统的环境变量
     在Linux系统下刷新主板BIOS的好方法
     删除文件提示:Operation not permitted
     Linux系统下硬盘挂载详细说明
     Linux文本模式下如何发送带附件的Email
     在Linux自动生成一个保险密码的方法
     Linux商业电影动画制作软件列表
    最 新 推 荐
     在Fedora Core系统中共享Windows打印机
     不同的类UNIX操作系统密码破解方法介绍
     UNIX的分支 服务器上的FreeBSD操作系统
     UNIX操作系统的加锁解锁:等待事件及唤醒
     Solaris TELNET ftp时间超长的解决方法
     SCO UNIX到Linux操作系统的程序移植问题
     使用Unix命令行模式高效地进行文本编辑
     Solaris第一次亲密接触
     Unix学习方法-高手之路
     FreeBSD下3D功能的实现
    相 关 文 章

    MySQL出现1067错误如何解决?
    MySQL数据库复位根用户的密码
    MySQL记录未知错误的发生的方法
    MySQL存储程序、函数以及复制的相关问题
    数据从MySQL迁移到Oracle的注意事项
    远程使用MySQL GUI工具
    mysqld_multi单机环境下启动多个mysql
    Windows XP下PHP+MySQL环境搭建
    在Ubuntu和Debian系统下安装PostgreSQL
    从网络上登录其它计算机的PostgreSQL

    | 设为首页 | 加入收藏 | 联系站长 | 友情链接 | 版权申明 | 网站公告

     

    Copyright 2006-2008 pcjx.com All Rights Reserved
    电脑技巧 版权所有 粤ICP备06059145号 地图
    本网站所有内容未经许可不得转载或做其他使用