Debian/Ubuntu命令方式快速安装squid

之前,我们介绍过如何通过源码方式在Debian下安装squid当然,那是个比较详细而且略微麻烦的过程。今天我们试试用较简单的apt命令方法安装squid服务。看看有与源码安装有何配置上的差异:

一、运行squid安装命令

root@netren:~# apt-get install squid
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
squid-common squid-langpack
Suggested packages:
squidclient squid-cgi logcheck-database resolvconf smbclient winbind
The following NEW packages will be installed:
squid squid-common squid-langpack  (这几个软件包将被安装)
0 upgraded, 3 newly installed, 0 to remove and 4 not upgraded.
Need to get 1,347kB of archives.
After this operation, 8,503kB of additional disk space will be used.
Do you want to continue [Y/n]?y
Get:1 http://hk.archive.ubuntu.com/ubuntu/ lucid/main squid-langpack 20100111-1 [228kB]
Get:2 http://hk.archive.ubuntu.com/ubuntu/ lucid/main squid-common 2.7.STABLE7-1ubuntu12 [353kB] (版本是2.7.STABLE7)
Get:3 http://hk.archive.ubuntu.com/ubuntu/ lucid/main squid 2.7.STABLE7-1ubuntu12 [766kB]
Fetched 1,347kB in 7s (180kB/s)
Preconfiguring packages ...
Selecting previously deselected package squid-langpack.
(Reading database ... 43247 files and directories currently installed.)
Unpacking squid-langpack (from .../squid-langpack_20100111-1_all.deb) ...
Selecting previously jeffrey guo deselected package squid-common.
Unpacking squid-common (from .../squid-common_2.7.STABLE7-1ubuntu12_all.deb) ...
Selecting previously deselected package squid.
Unpacking squid (from .../squid_2.7.STABLE7-1ubuntu12_i386.deb) ...
Processing triggers for ureadahead ...
Processing triggers for man-db ...
Setting up squid-langpack (20100111-1) ...
Setting up squid-common (2.7.STABLE7-1ubuntu12) ...

Setting up squid (2.7.STABLE7-1ubuntu12) ...
Creating squid spool directory structure
2011/01/05 18:05:08| Creating Swap Directories (安装时自动创建了cache缓存目录)

二、完成安装,进行查看:

root@netren:~# netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      1661/mysqld
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      2433/apache2
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      597/sshd
tcp        0      0 0.0.0.0:3128            0.0.0.0:*               LISTEN      2601/(squid) (squid端口正在监听运行)

三、squid在系统内的安装信息:

那么,它到底将安装目录及配置文件放在哪里了呢?
/etc/default/squid
/etc/init/squid.conf
/etc/init.d/squid (服务管理中添加了squid)
/etc/logrotate.d/squid (日志管理中添加了squid)  
/etc/resolvconf/update-libc.d/squid
/etc/squid/squid.conf (主要配置文件)
/usr/lib/squid/squid_session
/usr/lib/squid/squid_unix_group
/usr/lib/squid/unlinkd
/usr/lib/squid/wbinfo_group.pl

>>>阅读全文

你可能感兴趣的:(linux,职场,squid,休闲,netren)