Summary: Tài liệu hướng dẫn cài đặt và cấu hình máy chủ VOCW cache để phục vụ nội dung VOCW cho người dùng trong mạng cục bộ (LAN).
![]() Hình 1 |
allow-hotplug eth0 auto eth0 iface eth0 inet static address 203.162.71.70 netmask 255.255.255.224 gateway 203.162.71.65 dns-nameserver 203.162.168.36
nameserver 203.162.168.36 nameserver 203.162.0.181
deb http://security.debian.org/ etch/updates main contrib deb-src http://security.debian.org/ etch/updates main contrib deb http://http.us.debian.org/debian stable main contrib non-free deb http://ftp.debian.org/debian stable main contrib non-free
# apt-get install squid3
http_port 80 vhost
cache_mgr webmaster@vocw.edu.vn
visible_hostname www.vocw.edu.vn
cache_peer www.vocw.edu.vn parent 80 0 no-query
cache_dir ufs /var/spool/squid3 2000 16 256
logformat combined %>a %ui %un [%{%d/%b/%Y:%H:%M:%S +0000}tl] "%rm %ru HTTP/%rv" %Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Shaccess_log /var/log/squid3/access.log combined
# And finally deny all other access to this proxy http_access deny all
http_access allow Safe_ports
# /etc/init.d/squid3 restart
# apt-get install apache2
Listen 8080
NO_START=0
# /etc/init.d/apache2 start
# apt-get install awstats
... LogFile="/var/log/squid3/access.log" ... LogFormat=1 ... SiteDomain="vocw.xxx.edu.vn" ... DirIcons="/icon" ...
# cp -R /usr/share/awstats/icon/ /var/www/
# perl /usr/lib/cgi-bin/awstats.pl -config=/etc/awstats/awstats.conf -update >/dev/null
0,10,20,30,40,50 * * * * /usr/lib/cgi-bin/awstats.pl -config=/etc/awstats/awstats.conf -update >/dev/null
# apt-get install libwww-perl
# cd /opt/src # wget http://www.configserver.com/free/csf.tgz
# tar –xzvf csf.tgz
# cd csf # sh install.sh
# /etc/init.d/csf start # /etc/init.d/lfd start # csf -l
... TESTING = "0" ... AUTO_UPDATES = "1" ... TCP_IN = "20,21,22,25,53,80,110,143,443,465,953,993,995,3306,8080" ... CT_LIMIT = "200" ...
... 203.162.71.68 203.162.35.100 203.190.166.227 ...
... user:proxy user:www-data ...
... 203.162.71.68 203.162.35.100 203.190.166.227 ...
# /etc/init.d/csf restart # /etc/init.d/lfd restart
# sh /etc/csf/uninstall.sh
Comments, questions, feedback, criticisms?