|
|
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上没有找到相关的说明. |
|