squid缓存技术

squid缓存技术
配置squid
1、配置squid服务器
(1)创建管理squid的用户
[root@centos01 ~]#useradd -M -s /sbin/nologin squid
(2)配置squid
[root@centos01 squid-3.4.6]#./configure --prefix=/usr/local/aquid --sysconfdir=/etc/ --enable-linux-netfilter --enable-async-io=240 --enable-default-err-language=Simplify_Chinese --disable-poll --enable-epoll --enable-gunregx
(3)安装squid
[root@centos01 squid-3.4.6]#make && make install
(4)优化squid命令
[root@centos01 ~]#ln -s /usr/local/squid/sbin/* /usr/local/sbin/
(5)修改目录的所有者
[root@centos01 ~]#chown -R squid:squid /usr/local/squid
2、配置web服务器
[root@centos02 ~]# yum -y install httpd
[root@centos02 ~]# echo “www.benet.com” > /var/www/html/index.html
[root@centos02 ~]# dd if=/dev/zero of=/var/www/html/1.iso bs=5M count=2
[root@centos02 ~]# dd if=/dev/zero of=/var/www/html/2.iso bs=5M count=3
[root@centos02 ~]# systemctl start httpd
[root@centos02 ~]# systemctl enable httpd
3、配置传统代理
(1)修改squid主配置文件
[root@centos01 ~]#vim /etc/squid.conf
54 http_access allow all
55 http_port 3128
56 cache_effective_user squid
57 cache_effective_group squid
58 reply_body_max_size 10 MB
59 dns_nameserver 192.168.100.10
(2)检查语

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值