centos下简单配置安装Squid 3.0反向代理

223次阅读
没有评论

安装篇:

本教程应用环境为干净centos 5.5 ,预先分好并加载/data分区,并且关闭selinux及iptables

首先修改文件描述符并设定临时端口范围,这些设置重启后生效


cat >> /etc/security/limits.conf <<DDD

* soft nofile 8192

* hard nofile 20480

DDD

cat >> /etc/sysctl.conf <<DDD

#set temp port range

net.ipv4.ip_local_port_range = 32768 61000

DDD

init 6

确认修改是否正确


[root@sudutest ~]# ulimit -n

8192

[root@suduotest ~]# sysctl -n net.ipv4.ip_local_port_range

net.ipv4.ip_local_port_range = 32768 61000

添加squid专用账户


groupadd squid

useradd -g squid -s /bin/false -M squid

添加日志目录、设置缓存和日志目录的权限


mkdir /data/squidlog/

chown -R squid.squid /data

然后上传或者wget squid3.0软件tar包,tar zxvf解压,并且进入解压后的目录安装编译


./configure –prefix=/usr/local/squid3 –enable-async-io=100 –with-pthreads –enable-storeio=”aufs,diskd,ufs” –enable-removal-policies=”heap,lru” –enable-icmp –enable-delay-pools –enable-useragent-log –enable-referer-log –enable-kill-parent-hack –enable-arp-acl –enable-default-err-language=Simplify_Chinese –enable-err-languages=”Simplify_Chinese English” –disable-poll –disable-wccp –disable-wccpv2 –disable-ident-lookups –disable-internal-dns –enable-basic-auth-helpers=”NCSA” –enable-stacktrace –with-large-files –disable-mempools –with-filedescriptors=65535 –enable-ssl –enable-x-accelerator-var

make

make install

make install-pinger

至此squid已经成功安装了,然后大家自己所需的/usr/local/squid3/etc/squid.conf 配置文件,我这边的配置文件将会在

正文完
 0
国外主机测评
版权声明:本站原创文章,由 国外主机测评 于2025-11-13发表,共计1265字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。