- 论坛徽章:
- 0
|
1. Download software package from
www.sunfreeware.com
, and install it:
gunizp squid-2.5.STABLE6-sol9-sparc-local.gz
pkgadd d squid-2.5.STABLE6-sol9-sparc-local
This will by default, install into "/usr/local/squid".
2. Configuration and edit "/usr/local/squid/etc/squid.conf".
http_port 3128
cache_dir ufs /usr/local/squid/var/cache 100 16 256
dns_nameservers 202.106.196.115
http_access allow all
cache_effective_user nobody
cache_effective_group nogroup
visible_hostname unix2.jerry.com
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
3. After you've finished editing the configuration file, you can start Squid for the first time. First, you must create the cache directories. Do this by running Squid with the -z option:
1)/usr/local/squid/sbin/squid -z
2)chown R nobody:nogroup /usr/local/squid/var
Once that completes, you can start Squid and try it out. Use this command:
3)/usr/local/squid/sbin/squid -NCd1
If everything is working okay, then your console displays: "Ready to serve requests".
If you want to run squid in the background, as a daemon process, just leave off all options:
4)/usr/local/squid/sbin/squid
4. Squid client-side configuration:
In the configuration window of your Internet Explorer (IE), type in the IP address and port number of your configured squid server, e.g.,
192.168.0.32:3218
5. Shutdown the squid server
ps -ef | grep squid
1)/usr/local/squid/sbin/squid -k shutdown
or pkill squid
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/14353/showart_79806.html |
|