LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1476|回复: 19

失败的菜鸟安装squid N次失败的过程

[复制链接]
发表于 2006-3-15 10:18:13 | 显示全部楼层 |阅读模式
redhat AS4 双网卡 在网上到处找的帖子来学着安装 squid
内网网卡地址为192.168.0.193 外网网卡接的ADSLmoden
过程如下:
1. 下载源码包到/usr/local
2. tar -zxvf 源码包
3. 更名文件夹为squid
4. ./configure --prefix=/usr/local/squid
   make all
   make install
5. 添加一个新用户squid 修改/usr/local/squid文件夹属性为用户squid所有
6. vi /usr/local/suqid/etc/squid.conf
7. 删除
# Default:
# http_port 3128前面的 #并且改成 http_port 192.168.0.193:808
8. 修改
# And finally deny all other access to the proxy
http_access allow localhost
http_access deny all-----(http_access allow all)
9. 修改
# Default:
# cache_effective_user nobody --(删除前面的#号 并把nobody改为squid)

用命令 /usr/local/squid/sbin/squid -N -d1运行后出现下面的信息:

[root@localhost ~]# /usr/local/squid/sbin/squid -N -d1
2006/03/15 09:35:54| unrecognised basic auth scheme parameter 'casesensitive'
2006/03/15 09:35:54| Starting Squid Cache version 2.5.STABLE6 for i686-pc-linux- gnu...
2006/03/15 09:35:54| Process ID 8321
2006/03/15 09:35:54| With 1024 file descriptors available
2006/03/15 09:35:54| Performing DNS Tests...
2006/03/15 09:35:54| Successful DNS name lookup tests...
2006/03/15 09:35:54| DNS Socket created at 0.0.0.0, port 33416, FD 4
2006/03/15 09:35:54| Adding nameserver 202.98.96.68 from /etc/resolv.conf
2006/03/15 09:35:54| Adding nameserver 61.139.2.69 from /etc/resolv.conf
2006/03/15 09:35:54| Unlinkd pipe opened on FD 9
2006/03/15 09:35:54| Swap maxSize 102400 KB, estimated 7876 objects
2006/03/15 09:35:54| Target number of buckets: 393
2006/03/15 09:35:54| Using 8192 Store buckets
2006/03/15 09:35:54| Max Mem  size: 8192 KB
2006/03/15 09:35:54| Max Swap size: 102400 KB
2006/03/15 09:35:54| Rebuilding storage in /usr/local/squid/var/cache (CLEAN)
2006/03/15 09:35:54| Using Least Load store dir selection
2006/03/15 09:35:54| chdir: /var/spool/squid: (13) Permission denied
2006/03/15 09:35:54| Current Directory is /root
2006/03/15 09:35:54| Loaded Icons.
2006/03/15 09:35:54| Accepting HTTP connections at 192.168.0.193, port 808, FD 1 0.
2006/03/15 09:35:54| Accepting ICP messages at 0.0.0.0, port 3130, FD 11.
2006/03/15 09:35:54| WCCP Disabled.
2006/03/15 09:35:54| Ready to serve requests.
2006/03/15 09:35:55| Done scanning /usr/local/squid/var/cache swaplog (0 entries )
2006/03/15 09:35:55| Finished rebuilding storage from disk.
2006/03/15 09:35:55|         0 Entries scanned
2006/03/15 09:35:55|         0 Invalid entries.
2006/03/15 09:35:55|         0 With invalid flags.
2006/03/15 09:35:55|         0 Objects loaded.
2006/03/15 09:35:55|         0 Objects expired.
2006/03/15 09:35:55|         0 Objects cancelled.
2006/03/15 09:35:55|         0 Duplicate URLs purged.
2006/03/15 09:35:55|         0 Swapfile clashes avoided.
2006/03/15 09:35:55|   Took 1.0 seconds (   0.0 objects/sec).
2006/03/15 09:35:55| Beginning Validation Procedure
2006/03/15 09:35:55|   Completed Validation Procedure
2006/03/15 09:35:55|   Validated 0 Entries
2006/03/15 09:35:55|   store_swap_size = 0k
2006/03/15 09:35:56| storeLateRelease: released 0 objects

然后光标就在最下面的空格上闪烁 也不出现[root@localhost ~]#提示符
直到杀掉进程中的squid才会接着出现下面的东西:
2006/03/15 10:09:34| Preparing for shutdown after 0 requests
2006/03/15 10:09:34| Waiting 0 seconds for active connections to finish
2006/03/15 10:09:34| FD 10 Closing HTTP connection
2006/03/15 10:09:35| Shutting down...
2006/03/15 10:09:35| FD 11 Closing ICP connection
2006/03/15 10:09:35| Closing unlinkd pipe on FD 9
2006/03/15 10:09:35| storeDirWriteCleanLogs: Starting...
2006/03/15 10:09:35|   Finished.  Wrote 0 entries.
2006/03/15 10:09:35|   Took 0.0 seconds (   0.0 entries/sec).

现在运行squid后 用netstat -ntl查看了一下 也在侦听 192.168.0.193:808端口
但是 局域网内的windows机器都不能通过我代理上网.
请各位高手帮忙看看 我确实在论坛上和baidu.google上没有找到相关的说明.
 楼主| 发表于 2006-3-15 16:46:14 | 显示全部楼层
请知道问题的朋友所在的朋友花几分钟指点一下
回复 支持 反对

使用道具 举报

发表于 2006-3-15 18:13:57 | 显示全部楼层
然后光标就在最下面的空格上闪烁 也不出现[root@localhost ~]#提示符
直到杀掉进程中的squid才会接着出现下面的东西:

这个时候,就是 squid已经成功启动了,你又杀死了,当然就用不了了。
回复 支持 反对

使用道具 举报

发表于 2006-3-15 19:19:14 | 显示全部楼层
在你的squid.conf中设置下面这段信息再试试!

httpd_accel_port 80
httpd_accel_single_host off
httpd_accel_with_proxy on #如果设置off,就只能作透明代理了。
httpd_accel_uses_host_header on
httpd_accel_host virtual
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-3-15 21:45:54 | 显示全部楼层
Post by springwind426
在你的squid.conf中设置下面这段信息再试试!

httpd_accel_port 80
httpd_accel_single_host off
httpd_accel_with_proxy on #如果设置off,就只能作透明代理了。
httpd_accel_uses_host_header on
httpd_accel_host virtual


这几句是什么意思呢?
我代理开的是808端口 如果设置 httpd_accel_port 80会有影响吗?
还望耽搁您几分钟 解释一下
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-3-15 21:48:22 | 显示全部楼层
Post by 终极幻想
然后光标就在最下面的空格上闪烁 也不出现[root@localhost ~]#提示符
直到杀掉进程中的squid才会接着出现下面的东西:

这个时候,就是 squid已经成功启动了,你又杀死了,当然就用不了了。


当 squid 还在进程中的时候 所有的windows系统机器都不能通过我浏览网页 您误会我的意思了 不过还是谢谢您
回复 支持 反对

使用道具 举报

发表于 2006-3-15 22:24:22 | 显示全部楼层
chdir: /var/spool/squid: (13) Permission denied

不知道你看到这句话没,,log中的,解决了这个先。:)。
回复 支持 反对

使用道具 举报

发表于 2006-3-15 22:58:20 | 显示全部楼层
配置文件中有比较详细的说明

squid.conf.default
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-3-16 09:18:31 | 显示全部楼层
Post by 终极幻想
chdir: /var/spool/squid: (13) Permission denied

不知道你看到这句话没,,log中的,解决了这个先。:)。


说起来惭愧 我真不知道该怎么解决 请您再帮忙指点一下好吗?
回复 支持 反对

使用道具 举报

发表于 2006-3-16 10:11:40 | 显示全部楼层
这个目录的权限是什么?

你的 squid.conf 中的那个 user 是什么内容?两者要相同。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表