ubuntu 下的squid安装日志

本文介绍在Ubuntu 9.0.4环境下Squid代理服务器的安装、配置过程及常见问题解决方法,包括安装步骤、配置加速模式、解决权限问题等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

ubuntu 9.0.4

 

1) 安装

 

 

遇到问题
checking for C++ compiler default output file name...
configure: error: C++ compiler cannot create executables
See `config.log' for more details.
configure: error: ./configure failed for lib/libTrie

 

解决:

重新编译 ok

2)配置

在${squid_home}/etc/squid.cof中加入

      

     

    验证配置

    3)生成缓存目录

     

    默认会在${squid_home}/var/cache下生成一堆目录

    4)启动

    发现问题:
    squid进程起来了,但很快消失,并有错误日志

    FATAL: Cannot open '/home/pwlazy/dev/squid/var/logs/access.log' for writing.
        The parent directory must be writeable by the
        user 'nobody', which is the cache_effective_user
        set in squid.conf.

     

    解决:

    再次启动,发现问题:
    FATAL: Cannot open '/home/pwlazy/dev/squid/var/logs/store.log' for writing.
        The parent directory must be writeable by the
        user 'nobody', which is the cache_effective_user
        set in squid.conf.
    解决:

    再次仍然问题
    2009/11/14 02:31:38| /home/pwlazy/dev/squid/var/cache/00: (13) Permission denied
    FATAL:     Failed to verify one of the swap directories, Check cache.log
        for details.  Run 'squid -z' to create swap directories
        if needed, or if running Squid for the first time.

    解决

    上面的问题非常类似,总结一下:
    squid起来之后会有一个父进程,和1个或者多个工作进程,这些工作进程会读写access.log和store.log以及cache目录
    而父进程会读写cache.log

     

    5)从页面访问

    http://127.0.0.1

    发现问题:
    403

     

    解决:
    于是修改配置文件,
    将http_access deny all改为

    再次访问ok

     

    6)清除缓存

    发现问题

    403

     

    解决
     

     

    评论
    添加红包

    请填写红包祝福语或标题

    红包个数最小为10个

    红包金额最低5元

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

    抵扣说明:

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

    余额充值