- This topic has 2개 답변, 2명 참여, and was last updated 15 years, 1 month 전에 by 인베인. This post has been viewed 1244 times
-
-
cent5#> yum install squid
or rpm -ivh squid-2.6.STABLE6-5.el5_1.3.i386.rpm
cent5#>
cent5#>
cent5#> vi /etc/squid/squid.conf
------------------------------------------------------
http_port 21
# http_port 3128
cache_mem 16 MB
maximum_object_size 4096 KB
cache_dir ufs /var/spool/squid 100 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/cache.log
cache_store_log /var/log/squid/store.log
debug_options ALL,1
acl all src 0.0.0.0/0.0.0.0
acl localhost src 127.0.0.1/255.255.255.255
acl accessip src 172.16.0.0/255.255.255.0
acl accessip src 192.168.1.0/255.255.255.0
acl accessip src 218.209.85.0/255.255.255.0
acl accessip src 210.94.41.0/255.255.255.0
acl accessip src 211.189.127.0/255.255.255.0
acl accessip src 202.20.191.0/255.255.255.0
http_access allow localhost
http_access allow accessip
http_access deny all
icp_access allow all
visible_hostname localhost
cache_mgr hcwhcw
cache_effective_user squid
cache_effective_group squid
# cachemgr_passwd yourpass all
--------------------------------------------------------
cent5#> chkconfig squid on
cent5#> /etc/init.d/squid start
init_cache_dir /var/spool/squid... Starting squid: . [ OK ]
cent5#>
cent5#> netstat -tulpn | grep 3128
cent5#> vi /etc/sysconfig/iptables
-A RH-Firewall-1-INPUT -m state --state NEW,ESTABLISHED,RELATED -m tcp -p tcp --dport 3128 -j ACCEPT
cent5#> /etc/init.d/iptables restart
cent5#>
cent5#>/etc/init.d/squid restart를 실행하여 OK로 떨어지는지를 확인해 보시기 바랍니다.
올바르게 작동한다면 acl 설정을 변경하여 스퀴드 프록시 서버를 돌리면 됩니다.Open a webbrowser > Tools > Internet option > Network settings > and setup Squid server IP address and port # 3128.
* /etc/init.d/squid start시에 에러 발생시 원인
오류가 나온다면 반드시 /var/log/messages파일을 참조하시면 되는데, 계속 오류가 뜨는 것은
Type 설정에 문제가 있는 것입니다. init_cache_dir /var/spool/squid...이 메시지는 Cache Path
에서 Type값을 /var/spool/squid로 인식하여 알수 없는 Type값으로 인하여 발생하는 오류로
/var/log/messages에 이러한 내용이 포함되어 있을 것입니다.* 오픈소스는 Open Innovationa & 윈윈전략을 도모할 지언정 절대 공짜(무료)임을 뜻하지 않는다.치
- 답변은 로그인 후 가능합니다.