squid从http://www.squid-cache.org/下载:
wget http://www.squid-cache.org/Versions/v2/2.3/squid-2.3.STABLE2-src.tar.gz
tar zxvf squid-2.3.STABLE2-src.tar.gz #先解
cd squid-2.3.STABLE2
./configure --prefix=/etc/squid/ #再编译
make
make install #再安装
cd auth_modules/NCSA
make
make install(系统自动在/etc/squid/bin下创建ncsa_auth可执行文件)
htpasswd -n[mdps] username
htpasswd -nb[mdps] username password
-c Create a new file.
-n Don't update file; display results on stdout.
-m Force MD5 encryption of the password.
-d Force CRYPT encryption of the password (default).
-p Do not encrypt the password (plaintext).
-s Force SHA encryption of the password.
-b Use the password from the command line rather than prompting for it.
On Windows, NetWare and TPF systems the '-m' flag is used by default.
On all other systems, the '-p' flag will probably not work.