help..squid hit lemah

Diskusi tentang Ubuntu Server baik webserver, database server, samba server dan service lainnya serta jaringan menggunakan Sistem Operasi Ubuntu.
User avatar
Th4r3n

help..squid hit lemah

Post 24 Jun 2010, 01:43

tolong para master saya pake p4 2.4 ghz ram 512 hdd 40 gb

hdd di bagi :

7 gb buat system ext4
10 gb buat cache squid proxy1 reiFS
10 gb buat cache squid proxy2 reiFS
10 gb buat cache squid proxy3 reiFS
1 gb buat swap

dah running 3 hari hit nya cuma 32.38 %

tolong di cross check squid conf :

#==================================$
# Proxy Server Versi 2.7.Stable3
# by eyditharen@yahoo.com
#==================================$
#################################################################
# Port
#################################################################
http_port 3128 transparent
icp_port 3130
prefer_direct off
#################################################################
# Cache & Object
#################################################################
cache_mem 16 MB
cache_swap_low 98
cache_swap_high 99
max_filedesc 8192
maximum_object_size 102400 KB
minimum_object_size 0 KB
maximum_object_size_in_memory 64 KB
ipcache_size 4096
ipcache_low 98
ipcache_high 99
fqdncache_size 4096
cache_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF
#################################################################
# cache_dir
cache_dir aufs /home/proxy1 9000 32 128
cache_dir aufs /home/proxy2 9000 32 128
cache_dir aufs /home/proxy3 9000 32 128
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log none
pid_filename /var/run/squid.pid
cache_swap_log /var/log/squid/swap.state
dns_nameservers /etc/resolv.conf
emulate_httpd_log off
hosts_file /etc/hosts
half_closed_clients off
negative_ttl 1 minutes
#################################################################
# Rules: Safe Port
#################################################################
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563 873 # https snews rsync
acl Safe_ports port 80 # http
acl Safe_ports port 20 21 # ftp
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 631 # cups
acl Safe_ports port 10000 # webmin
acl Safe_ports port 901 # SWAT
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 873 # rsync
acl Safe_ports port 110 # POP3
acl Safe_ports port 25 # SMTP
acl Safe_ports port 2095 2096 # webmail from cpanel
acl Safe_ports port 2082 2083 # cpanel
acl purge method PURGE
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports !SSL_ports
http_access deny CONNECT !SSL_ports !Safe_ports
#################################################################
# Refresh Pattern
#################################################################
refresh_pattern ^http\:\/\/*\.facebook\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.kaskus\.us\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.google\.co\*.*/ 10080 90% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.yahoo\.co*\.*/ 10080 90% 43200 reload-into-ims
refresh_pattern ^http\:\/\/.*\.windowsupdate\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/office\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/windowsupdate\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/w?xpsp[0-9]\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/w2ksp[0-9]\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/download\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/download\.macromedia\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^ftp\:\/\/ftp\.nai\.com/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/ftp\.software\.ibm\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.friendster\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.detik\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.kaskus\.us\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.google\.co\*.*/ 10080 90% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.yahoo\.co*\.*/ 10080 90% 43200 reload-into-ims

refresh_pattern ^http://*.apps.facebook.*/.* 720 80% 4320
refresh_pattern ^http://*.profile.ak.fbcdn.net/.* 720 80% 4320
refresh_pattern ^http://*.creative.ak.fbcdn.net/.* 720 80% 4320
refresh_pattern ^http://*.static.ak.fbcdn.net/.* 720 80% 4320
refresh_pattern ^http://*.facebook.poker.zynga.com/.* 720 80% 4320
refresh_pattern ^http://*.statics.poker.static.zynga.com/.* 720 80% 4320
refresh_pattern ^http://*.zynga.*/.* 720 80% 4320
refresh_pattern ^http://*.texas_holdem.*/.* 720 80% 4320
refresh_pattern ^http://*.google.*/.* 720 80% 4320
refresh_pattern ^http://*.indowebster.*/.* 720 80% 4320
refresh_pattern ^http://*.4shared.*/.* 720 80% 4320
refresh_pattern ^http://*.yahoo.com/.* 720 80% 4320
refresh_pattern ^http://*.yimg.*/.* 720 80% 4320
refresh_pattern ^http://*.plasa.com/.* 720 80% 4320
refresh_pattern ^http://*.boleh.*/.* 720 80% 4320
refresh_pattern ^http://*.detik.*/.* 180 80% 4320
refresh_pattern ^http://*.detikinet.*/.* 180 80% 4320
refresh_pattern ^http://*.detikhot.*/.* 180 80% 4320
refresh_pattern ^http://*.detiportal.*/.* 180 80% 4320
refresh_pattern ^http://*.kompas.*/.* 180 80% 4320
refresh_pattern ^http://*.kapanlagi.*/.* 720 80% 4320
refresh_pattern ^http://*.google-analytics.*/.* 720 80% 4320

refresh_pattern ^http://(.*?)/get_video\? 10080 90% 999999 override-expire ignore-no-cache ignore-private
refresh_pattern ^http://(.*?)/videoplayback\? 10080 90% 999999 override-expire ignore-no-cache ignore-private
refresh_pattern -i (get_video\?|videoplayback\?id|videoplayback.*id) 161280 50000% 525948 override-expire ignore-reload

# compressed
refresh_pattern -i \.gz$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.cab$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.bzip2$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.bz2$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.gz2$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.tgz$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.tar.gz$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.zip$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.rar$ 1008000 90% 99999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.tar$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.ace$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.7z$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload

# documents
refresh_pattern -i \.xls$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.doc$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.xlsx$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.docx$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.pdf$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.ppt$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.pptx$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.rtf\?$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload

# multimedia
refresh_pattern -i \.mid$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.wav$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.viv$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.mpg$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.mov$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.avi$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.asf$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.qt$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.rm$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.rmvb$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.mpeg$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.wmp$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.3gp$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.mp3$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.mp4$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload

# web content
refresh_pattern -i \.js$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.psf$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.html$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.htm$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.css$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.swf$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.js\?$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.css\?$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.xml$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload

# images
refresh_pattern -i \.gif$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.jpg$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.png$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.jpeg$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.bmp$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.psd$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.ad$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.gif\?$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.jpg\?$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.png\?$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.jpeg\?$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.psd\?$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload

# application
refresh_pattern -i \.deb$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.rpm$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.msi$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.exe$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.dmg$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload

# misc
refresh_pattern -i \.dat$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.qtm$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload

# itunes
refresh_pattern -i \.m4p$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.mpa$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload

refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i \.(avi|wav|mid|mp?|mpeg|mov|3gp|wm?|swf|flv|x-flv|css|js|axd)$ 10080 95% 302400 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private ignore-auth
refresh_pattern -i \.(gif|png|jp?g|ico|bmp)$ 4320 95% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private ignore-auth
refresh_pattern -i \.(rpm|cab|exe|msi|msu|zip|tar|gz|tgz|rar|bin|7z|doc|xls|ppt|pdf)$ 4320 90% 10080 override-expire override-lastmod reload-into-ims
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 360 90% 302400 override-lastmod reload-into-ims

#################################################################
# HAVP + Clamav
#################################################################
cache_peer 127.0.0.1 parent 8080 0 no-query no-digest no-netdb-exchange default
#################################################################
# HIERARCHY (BYPASS CGI)
#################################################################
#hierarchy_stoplist cgi-bin ? .js .jsp
#acl QUERY urlpath_regex cgi-bin \? .js .jsp
#no_cache deny QUERY
#################################################################
# SNMP
#################################################################
snmp_port 3401
acl snmpsquid snmp_community public
snmp_access allow snmpsquid localhost
snmp_access deny all
#################################################################
# ALLOWED ACCESS
#################################################################
acl persegi src 192.168.0.0/24 ## Sesuaikan
http_access allow persegi
http_access allow localhost
http_access deny all
http_reply_access allow all
icp_access allow persegi
icp_access allow localhost
icp_access deny all
always_direct deny all
#################################################################
# Cache CGI & Administrative
#################################################################
cache_mgr eyditharen@yahoo.com
visible_hostname dns.noval.net
cache_effective_user proxy
cache_effective_group proxy
coredump_dir /var/spool/squid
shutdown_lifetime 10 seconds
logfile_rotate 14

###################################################################


User avatar
Rh354

Post 24 Jun 2010, 05:49

sepertinya gw kenal ni refresh pattern(punya ccpb y)....itu cache_dirnya klo cm 1 HDD mending 1 partisi aja

buat banyak directory maupun partisi cache dalam 1 HDD ga' akan meningkatkan performa tp klo turun iya :D jadikan 1 aja cache_dirnya...coba cache dir dibuat aja 16Gb dengan 1 partisi cache_dir..mainin opsi fstabnya n parameter kernel jg buat ningkatin performa

cache_mem 16 MB ----> ga' kebanyakan nich segini..udah coba 8Mb
max_filedesc 8192 ---> klo pake desktop buat aja 2048

kebanyakan refresh pattern jg ga' baik buat kesehatan squid :D

tambah ram jadi 1Gb :D


User avatar
Th4r3n

Post 24 Jun 2010, 07:40

bener bro kirain makin banyak refresh pattern nya makin kencang
ane coba dulu ya bro

" mainin opsi fstabnya n parameter kernel jg buat ningkatin performa " nah yg ini yg pengen tau lebih detail maklum masih nubie


User avatar
sipelaut
Contact:

Post 25 Jun 2010, 16:58

:) nyimak dolo broo... :)


User avatar
suryayusra
Contact:

Post 26 Jun 2010, 08:29

klo cahce dir banya segitu, sampe 3 direcktory apa gak pp bro cojack :D
klo proxy kantor ane cuma pake 1 cache dir.

mohon pencerahan na.


User avatar
Rh354

Post 26 Jun 2010, 09:13

suryayusra wrote:klo cahce dir banya segitu, sampe 3 direcktory apa gak pp bro cojack :D
klo proxy kantor ane cuma pake 1 cache dir.

mohon pencerahan na.
klo cache_dir dipisah bukan per partisi alias cache_dir dipisah memakai HDD yg berbeda misal 2 ato lebih malah lebih bagus...tp klo make cache_dir banyak partisi di 1 HDD malah ga' efektif n menurunkan performa squidnya :D jadi lebih baik klo cm punya 1 HDD 1 cache_dir..klo mo lebih bagus lg minimal 2 HDD...1 HDD khusus sistem n 1 HDD khusus cache squid (HDDnya ga' usah besar2 mengingat batasan spindle HDD jg mempengaruhi kinerja squid,jadi mending HDD 20 Gb ada 5 biji daripada 1 HDD dengan kapasitas 250Gb)...

maap nubi melangkahi master yg paham squid...


User avatar
suryayusra
Contact:

Post 26 Jun 2010, 11:56

ooouw begitu rh354 :D
ngerti dah kamsut nya

ane jg udah baca2 blok ente tentang VPS
siiip


User avatar
naruse

Post 26 Jun 2010, 15:28

cache_swap low sama high nya terlalu tinggi nanti cache lebih cepet ke hapus meningan di set normal aja

cache_swap_low 90
cache_swap_high 95

ipcache_low 90
ipcache_high 95

terus jangan terlalu banyak aturan dalam squid.. karena itu membuat squid tidak stabil :)


User avatar
sipelaut
Contact:

Post 26 Jun 2010, 18:09

naruse wrote: terus jangan terlalu banyak aturan dalam squid.. karena itu membuat squid tidak stabil :)
aturan yang seperti apa broo...???
tolong dong kasih tau???


User avatar
naruse

Post 26 Jun 2010, 20:58

# Refresh Pattern
#################################################################
refresh_pattern ^http\:\/\/*\.facebook\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.kaskus\.us\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.google\.co\*.*/ 10080 90% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.yahoo\.co*\.*/ 10080 90% 43200 reload-into-ims
refresh_pattern ^http\:\/\/.*\.windowsupdate\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/office\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/windowsupdate\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/w?xpsp[0-9]\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/w2ksp[0-9]\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/download\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/download\.macromedia\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^ftp\:\/\/ftp\.nai\.com/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/ftp\.software\.ibm\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.friendster\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.detik\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.kaskus\.us\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.google\.co\*.*/ 10080 90% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.yahoo\.co*\.*/ 10080 90% 43200 reload-into-ims

refresh_pattern ^http://*.apps.facebook.*/.* 720 80% 4320
refresh_pattern ^http://*.profile.ak.fbcdn.net/.* 720 80% 4320
refresh_pattern ^http://*.creative.ak.fbcdn.net/.* 720 80% 4320
refresh_pattern ^http://*.static.ak.fbcdn.net/.* 720 80% 4320
refresh_pattern ^http://*.facebook.poker.zynga.com/.* 720 80% 4320
refresh_pattern ^http://*.statics.poker.static.zynga.com/.* 720 80% 4320
refresh_pattern ^http://*.zynga.*/.* 720 80% 4320
refresh_pattern ^http://*.texas_holdem.*/.* 720 80% 4320
refresh_pattern ^http://*.google.*/.* 720 80% 4320
refresh_pattern ^http://*.indowebster.*/.* 720 80% 4320
refresh_pattern ^http://*.4shared.*/.* 720 80% 4320
refresh_pattern ^http://*.yahoo.com/.* 720 80% 4320
refresh_pattern ^http://*.yimg.*/.* 720 80% 4320
refresh_pattern ^http://*.plasa.com/.* 720 80% 4320
refresh_pattern ^http://*.boleh.*/.* 720 80% 4320
refresh_pattern ^http://*.detik.*/.* 180 80% 4320
refresh_pattern ^http://*.detikinet.*/.* 180 80% 4320
refresh_pattern ^http://*.detikhot.*/.* 180 80% 4320
refresh_pattern ^http://*.detiportal.*/.* 180 80% 4320
refresh_pattern ^http://*.kompas.*/.* 180 80% 4320
refresh_pattern ^http://*.kapanlagi.*/.* 720 80% 4320
refresh_pattern ^http://*.google-analytics.*/.* 720 80% 4320

contohnya ...


User avatar
naruse

Post 26 Jun 2010, 22:12

http_port 3128 transparent
icp_port 0
server_http11 on

cache_mem 8 MB

maximum_object_size 20 MB
#maximum_object_size_in_memory 512 KB

cache_swap_low 90%
cache_swap_high 95%
cache_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF

ipcache_size 8192
fqdncache_size 8192
ipcache_low 90
ipcache_high 95

cache_dir aufs /usr/local/squid/cache 20400 48 256

#access_log /usr/local/squid/access.log
cache_log /usr/local/squid/cache.log
cache_store_log none
mime_table /usr/share/squid/mime.conf
#pid_filename /var/run/squid.pid
coredump_dir /var/spool/squid

log_fqdn off
log_icp_queries off
buffered_logs off
emulate_httpd_log off

#==============================================
# FTP section
#==============================================

ftp_list_width 32
ftp_passive on
ftp_sanitycheck on

#dns_nameservers 202.134.0.155 222.124.204.34

refresh_pattern -i \.(class|css|js|gif|jpg|ps)$ 0 80% 43200 ignore-reload overr$
refresh_pattern -i \.(jpe|jpeg|png|bmp|tif)$ 0 80% 43200 ignore-reload overrid$
refresh_pattern -i \.(tiff|mov|avi|qt|mpeg|flv|ra|rm|wmv|divx)$ 0 80% 43200 ign$
refresh_pattern -i \.(mpg|mpe|wav|au|mid|mp3|mp4|ac4|swf)$ 0 80% 43200 ignore-r$
refresh_pattern -i \.(zip|gz|arj|lha|lzh|7z)$ 0 80% 43200 ignore-reload overrid$
refresh_pattern -i \.(rar|tgz|tar|exe|bin|rpm|iso)$ 0 80% 43200 ignore-reload o$
refresh_pattern -i \.(hqx|pdf|rtf|doc|swf|xls|ppt|pdf|docx|xlsx)$ 0 80% 43200 i$
refresh_pattern -i \.(inc|cab|ad|txt|dll|dat)$ 0 80% 43200 ignore-reload overr$

refresh_pattern /.gif 4320 50% 43200
refresh_pattern /.jpg 4320 50% 43200
refresh_pattern /.jpeg 4320 50% 43200
refresh_pattern /.png 4320 50% 43200
refresh_pattern ^http://mail.yahoo.com/.* 720 80% 10080
refresh_pattern ^http://*.yahoo.*/.* 720 50% 7200
refresh_pattern ^http://*.detik.com/.* 720 50% 2880
refresh_pattern ^http://*.facebook.com/.* 720 90% 10080
refresh_pattern ^http://*.4shared.com/.* 720 50% 10080
refresh_pattern ^http://*.youtube.com/.* 720 70% 10080
refresh_pattern ^ftp: 1440 50% 12960 reload-into-ims
refresh_pattern ^gopher: 1440 0% 10080
refresh_pattern . 0 20% 4320

#quick_abort_min 0 KB
#quick_abort_max 0 KB
#quick_abort_pct 100%

#==============================================
# ACL section
#==============================================
request_timeout 15 seconds
shutdown_lifetime 15 seconds
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8 # RFC1918 possible internal network
acl localnet1 src 192.168.xx.xx/24 # RFC1918 possible internal network
acl localnet2 src 192.168.xx.xx/24 # RFC1918 possible internal network
acl localnet3 src 192.168.xx.xx/24
acl localnet4 src 10.10.xx.xxx/32
acl SSL_ports port 443 563
acl Safe_ports port 20
acl Safe_ports port 21
acl Safe_ports port 70
acl Safe_ports port 80
acl Safe_ports port 81
acl Safe_ports port 443 563
acl Safe_ports port 210
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl Safe_ports port 1025-65535
acl PURGE method PURGE
acl CONNECT method CONNECT

http_reply_access allow all

http_access allow manager localhost
http_access allow PURGE localhost
http_access allow localnet1
http_access allow localnet2
http_access allow localnet3
http_access allow localnet4

http_access deny localhost
http_access deny PURGE
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow all
visible_hostname orange
header_access Accept-Encoding deny all

#==============================================
# MISCELLANEOUS
#==============================================
logfile_rotate 7
negative_ttl 2 minutes
client_persistent_connections off
server_persistent_connections off
pipeline_prefetch on
vary_ignore_expire on
reload_into_ims on
nonhierarchical_direct off
prefer_direct off
memory_pools off
ie_refresh on

cache_effective_user squid
cache_effective_group squid

cache_mgr rizal_manthony@yahoo.com


bro pake ini aja .. ini settingan saya. coba aja sapa tau bisa membantu ... nanti kreasikan sendiri aja


User avatar
Th4r3n

Post 30 Jun 2010, 12:12

ok thanks di coba bro


User avatar
Th4r3n

Post 30 Jun 2010, 12:26

2010/06/30 12:25:51| parse_refreshpattern: Unknown option '\.(class|css|js|gif|jpg|ps)$': overr$
2010/06/30 12:25:51| parse_refreshpattern: Unknown option '\.(jpe|jpeg|png|bmp|tif)$': overrid$
2010/06/30 12:25:51| parse_refreshpattern: Unknown option '\.(tiff|mov|avi|qt|mpeg|flv|ra|rm|wmv|divx)$': ign$
2010/06/30 12:25:51| parse_refreshpattern: Unknown option '\.(mpg|mpe|wav|au|mid|mp3|mp4|ac4|swf)$': ignore-r$
2010/06/30 12:25:51| parse_refreshpattern: Unknown option '\.(zip|gz|arj|lha|lzh|7z)$': overrid$
2010/06/30 12:25:51| parse_refreshpattern: Unknown option '\.(rar|tgz|tar|exe|bin|rpm|iso)$': o$
2010/06/30 12:25:51| parse_refreshpattern: Unknown option '\.(hqx|pdf|rtf|doc|swf|xls|ppt|pdf|docx|xlsx)$': i$
2010/06/30 12:25:51| parse_refreshpattern: Unknown option '\.(inc|cab|ad|txt|dll|dat)$': overr$
FATAL: getpwnam failed to find userid for effective user 'squid'
Squid Cache (Version 2.7.STABLE7): Terminated abnormally.


erroor bro


User avatar
Rh354

Post 30 Jun 2010, 12:34

gw mah simpel2 aja

###########################################
# HIGH PERFORMANCE SQUID 2.7
# Config date : 21 April 2010
###########################################

# ACCESS CONTROLS
# -----------------

acl QUERY urlpath_regex -i cgi-bin \? \.php$ \.asp$ \.shtml$ \.cfm$ \.cfml$ \.phtml$ \.php3$ localhost
acl localnet src 10.0.0.0/8
acl localnet src 172.16.0.0/12
acl localnet src 192.168.0.0/16
acl all src 0.0.0.0/0.0.0.0
acl localhost src 127.0.0.1/32
acl safeports port 21 70 80 210 280 443 488 563 591 631 777 901 81 3128 1025-65535
acl sslports port 443 563 81
acl manager proto cache_object
acl purge method PURGE
acl connect method CONNECT
acl ym dstdomain .messenger.yahoo.com .psq.yahoo.com
acl ym dstdomain .us.il.yimg.com .msg.yahoo.com .pager.yahoo.com
acl ym dstdomain .rareedge.com .ytunnelpro.com .chat.yahoo.com
acl ym dstdomain .voice.yahoo.com
acl ymregex url_regex yupdater.yim ymsgr myspaceim

http_access deny ym
http_access deny ymregex
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !safeports
http_access deny CONNECT !sslports
http_access allow localhost
http_access allow localnet
http_access deny all

# NETWORK OPTIONS
# -----------------
http_port 3128 transparent
#htcp_port 4827
icp_access deny all

# OPTIONS WHICH AFFECT THE CACHE SIZE
# -----------------------------------

cache_mem 8 MB
maximum_object_size_in_memory 32 KB
memory_replacement_policy heap GDSF
cache_replacement_policy heap LFUDA
cache_dir aufs /cache 4000 10 256
maximum_object_size 128000 KB
cache_swap_low 90
cache_swap_high 95
update_headers off

# LOGFILE PATHNAMES AND CACHE DIRECTORIES
# ---------------------------------------

#access_log /cache/access.log
access_log none
cache_log /cache/cache.log
#cache_log /dev/null
cache_store_log none
logfile_rotate 5
log_ip_on_direct off
log_icp_queries off
buffered_logs off
netdb_filename none
client_db off
#pid_filename /var/run/squid.pid

# OPTIONS FOR TUNING THE CACHE
# ----------------------------

cache deny QUERY
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i \.(gif|png|jp?g|ico|bmp|tiff?)$ 10080 95% 43200 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i \.(rpm|cab|deb|exe|msi|msu|zip|tar|gz|tgz|rar|bin|7z|doc?|xls?|ppt?|pdf|nth|psd|sis)$ 10080 90% 43200 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i \.(avi|iso|wav|mid|mp?|mpeg|mov|3gp|wm?|swf|flv|x-flv|axd)$ 43200 95% 432000 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i \.(html|htm|css|js)$ 1440 75% 40320
refresh_pattern -i \.index.(html|htm)$ 0 75% 10080
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 1440 90% 10080

quick_abort_min 0 KB
quick_abort_max 0 KB
quick_abort_pct 98
store_avg_object_size 13 KB

# HTTP OPTIONS
# -------------

server_http11 on
collapsed_forwarding on
vary_ignore_expire on
header_access From deny all
header_access Server deny all
header_access Link deny all
header_access Via deny all
header_access X-Forwarded-For deny all

# TIMEOUTS
# --------

forward_timeout 240 second
connect_timeout 30 second
peer_connect_timeout 5 second
read_timeout 600 second
request_timeout 60 second
persistent_request_timeout 60 second
client_lifetime 86400 second
half_closed_clients off
pconn_timeout 60 second
shutdown_lifetime 10 second

# ADMINISTRATIVE PARAMETERS
# ---------------------------

cache_mgr Rh354
cache_effective_user proxy
cache_effective_group proxy
httpd_suppress_version_string on
visible_hostname Rh354

# ADVANCED NETWORKING OPTIONS
# -----------------------------

max_filedescriptors 2048

# DNS OPTIONS
# -------------

check_hostnames off
dns_timeout 10 seconds
#DNS NAWALA
dns_nameservers 127.0.0.1
#dns_nameservers 180.131.144.144
#dns_nameservers 180.131.144.145
hosts_file /etc/hosts
ipcache_size 8192
ipcache_low 90
ipcache_high 95

# MISCELLANEOUS
# --------------

memory_pools off
forwarded_for off
reload_into_ims on
coredump_dir /cache
pipeline_prefetch on
offline_mode off

###### END CONFIGURATION ###########


User avatar
Th4r3n

Post 30 Jun 2010, 12:35

dah di hapus pattern nya

eroor juga bro

oot@noval:~# squid -f /etc/squid/squid.conf -z
FATAL: getpwnam failed to find userid for effective user 'squid'
Squid Cache (Version 2.7.STABLE7): Terminated abnormally.
CPU Usage: 0.004 seconds = 0.004 user + 0.000 sys
Maximum Resident Size: 5968 KB
Page faults with physical i/o: 0
Aborted (core dumped)

apa nya lg ya ??? help.. new bie neh


User avatar
Rh354

Post 30 Jun 2010, 12:55

disesuaikan donk ama

cache_effective_user proxy
cache_effective_group proxy

make proxy apa squid..jgn lsg kopas :blush:

jgn lupa di chown

chown -R user:grupnya tempat partisi cachenya

klo di gw

chown -R proxy:proxy /cache

pastikan bener dl konfigurasinya

sudo squid -k parse

klo ga' ada tulisan apa2 berarti ga' error..


User avatar
naruse

Post 30 Jun 2010, 16:35

intinya setiap apa yang diset di squid.conf, setingan itu harus ada..
misal mulai dari log nya harus ada dan harus di rumah owner nya sesuai dengan cache_effective_user/ cache_effective_group di squid.conf

jdi cek dulu ada kaga cache.log dan access.log nya dan sesuai dengan setingan di squid.conf nya tidak ... ini buat masukan buat para newbie kayak saya ^^


User avatar
naruse

Post 30 Jun 2010, 16:38

itu kesalahan di refresh pattern saya kurang lengkap copy dari squid saya

yang bener ignore-reload override-expire reload-into-ims


User avatar
sipelaut
Contact:

Post 30 Jun 2010, 19:25

> hosts_file /etc/hosts
broo untuk file di /etc/hosts diisi apa yaa ??
soalnya bingung nichh sama settingan yang ini
setelah liat dari beberapa tutorial ada yang makek dan ada yg gak makek??


User avatar
naruse

Post 30 Jun 2010, 19:58

topologi kamu emang seperti apa bro ? linux nya sebagai server dan proxy atau gimana nih ?


User avatar
sipelaut
Contact:

Post 30 Jun 2010, 20:11

naruse wrote:topologi kamu emang seperti apa bro ? linux nya sebagai server dan proxy atau gimana nih ?
waduhh... kok sampek topologi segala brooo...


User avatar
upik

Post 02 Jul 2010, 15:11

Pak.. Mas..

kenapa squid saya sering banget seperti macet, dan kemudian tampil seperti ini :
Image

Padahal PDNSD berjalan dengan normal, saya cek pakai squid -k parse, tidak ada error,
saya cek pakai cara lain, lalu dibilang ada masalah:
root@ubuntuproxy1:~# tail /var/log/messages
Jul 2 14:51:54 ubuntuproxy1 squid[866]: Squid Parent: child process 870 started
Jul 2 14:51:55 ubuntuproxy1 squid[809]: Squid Parent: child process 812 exited due to signal 6
Jul 2 14:51:58 ubuntuproxy1 squid[809]: Squid Parent: child process 1003 started
Jul 2 14:51:58 ubuntuproxy1 squid[809]: Squid Parent: child process 1003 exited with status 1
Jul 2 14:52:01 ubuntuproxy1 squid[809]: Squid Parent: child process 1009 started
Jul 2 14:52:01 ubuntuproxy1 squid[809]: Squid Parent: child process 1009 exited with status 1
Jul 2 14:52:04 ubuntuproxy1 squid[809]: Squid Parent: child process 1011 started
Jul 2 14:52:04 ubuntuproxy1 squid[809]: Squid Parent: child process 1011 exited with status 1
Jul 2 14:52:07 ubuntuproxy1 squid[809]: Squid Parent: child process 1013 started
Jul 2 14:52:07 ubuntuproxy1 squid[809]: Squid Parent: child process 1013 exited with status 1

trus di cek disini kok dibilang jalan:
root@ubuntuproxy1:~# ps ax | grep squid
866 ? Ss 0:00 /usr/sbin/squid -D -YC
870 ? Sl 0:00 (squid) -D -YC
874 ? S 0:00 (squidGuard) -c /etc/squid/squidGuard.conf
877 ? S 0:00 (squidGuard) -c /etc/squid/squidGuard.conf
880 ? S 0:00 (squidGuard) -c /etc/squid/squidGuard.conf
882 ? S 0:00 (squidGuard) -c /etc/squid/squidGuard.conf
885 ? S 0:00 (squidGuard) -c /etc/squid/squidGuard.conf
1121 pts/0 S+ 0:00 grep --color=auto squid

mohon bantuannya dong...pusing sama cekuit nih ..


User avatar
Rh354

Post 04 Jul 2010, 10:30

cek dns namenya...


User avatar
upik

Post 08 Jul 2010, 23:28

Akhirnya install ulang Mas, lupa salahnya dimana, setelah install baru dan mulai konfigurasi pelan2 lagi, eh lancar..


User avatar
zitux
Contact:

Post 28 Jul 2010, 06:29

Rh354 wrote:cek dns namenya...
cara cek dns name nya gimana mas ?


User avatar
MasDjo
Contact:

Post 01 Aug 2010, 11:21

Kayaknya agar squid optimal di-server masing2, perlu pake yg versi compile sendiri, shg kinerja squid bisa optimal sesuai dg spek komputernya.
Saya sudah membuktikan nih, sebelumnya pake yg standar ( dari repositori ubuntu ), request disk ratiosnya (60menit) paling tinggi sekitar 30%.
Setelah compile sendiri, bisa meningkat mencapai 70% padahal squid.conf yg dipake tetep sama.
Ini hasil squidclient mgr:info yg sekarang : :)
[spoiler]

Code: Select all

Squid Object Cache: Version 2.7.STABLE9
Start Time:	Sun, 01 Aug 2010 02:47:34 GMT
Current Time:	Sun, 01 Aug 2010 04:14:28 GMT
Connection information for squid:
	Number of clients accessing cache:	7
	Number of HTTP requests received:	12902
	Number of ICP messages received:	0
	Number of ICP messages sent:	0
	Number of queued ICP replies:	0
	Number of HTCP messages received:	0
	Number of HTCP messages sent:	0
	Request failure ratio:	 0.00
	Average HTTP requests per minute since start:	148.5
	Average ICP messages per minute since start:	0.0
	Select loop called: 206930 times, 25.197 ms avg
Cache information for squid:
	Request Hit Ratios:	5min: 14.6%, 60min: 17.1%
	Byte Hit Ratios:	5min: 9.4%, 60min: 13.4%
	Request Memory Hit Ratios:	5min: 5.6%, 60min: 6.9%
	Request Disk Hit Ratios:	5min: 80.3%, 60min: 75.3%
	Storage Swap size:	413756 KB
	Storage Mem size:	8148 KB
	Mean Object Size:	13.60 KB
	Requests given to unlinkd:	0
Median Service Times (seconds)  5 min    60 min:
	HTTP Requests (All):   0.58309  0.64968
	Cache Misses:          0.76407  0.94847
	Cache Hits:            0.01035  0.01955
	Near Hits:             0.49576  0.64968
	Not-Modified Replies:  0.00307  0.00463
	DNS Lookups:           0.06083  0.03696
	ICP Queries:           0.00000  0.00000
Resource usage for squid:
	UP Time:	5213.961 seconds
	CPU Time:	478.740 seconds
	CPU Usage:	9.18%
	CPU Usage, 5 minute avg:	13.33%
	CPU Usage, 60 minute avg:	9.20%
	Process Data Segment Size via sbrk(): 17272 KB
	Maximum Resident Size: 0 KB
	Page faults with physical i/o: 1
Memory usage for squid via mallinfo():
	Total space in arena:   17272 KB
	Ordinary blocks:        17126 KB    787 blks
	Small blocks:               0 KB      0 blks
	Holding blocks:          2616 KB      3 blks
	Free Small blocks:          0 KB
	Free Ordinary blocks:     145 KB
	Total in use:           19742 KB 99%
	Total free:               145 KB 1%
	Total size:             19888 KB
Memory accounted for:
	Total accounted:        13334 KB
	memPoolAlloc calls: 2031202
	memPoolFree calls: 1924585
File descriptor usage for squid:
	Maximum number of file descriptors:   8192
	Largest file desc currently in use:    189
	Number of file desc currently in use:  155
	Files queued for open:                   0
	Available number of file descriptors: 8037
	Reserved number of file descriptors:   100
	Store Disk files open:                   7
	IO loop method:                     epoll
Internal Data Structures:
	 30489 StoreEntries
	  2024 StoreEntries with MemObjects
	  2006 Hot Object Cache Items
	 30418 on-disk objects
[/spoiler]
padahal server saya pas-pasan, Pentium 3 733 RAM 384, melayani 5 client + server LTSP :grin:

Ini contoh tutor yg bagus untuk compile squid :
Compile squid 2.7stable9 by mastah Rh354


User avatar
zitux
Contact:

Post 01 Aug 2010, 17:19

Code: Select all

 Request Disk Hit Ratios:        5min: 53.7%, 60min: 72.5%
:crazy: :crazy: :crazy: :crazy:
binun ada yg bilang pake perasaaan ada yg bilang cari hit paling tinggi :crazy: :crazy: :crazy: :crazy:


User avatar
MasDjo
Contact:

Post 01 Aug 2010, 17:35

@Zitux : Mungkin digabung, waktu browsing gimana rasanya lebih cepat akses apa gak, trus dicek pake squidclient ... :grin:


User avatar
Rh354

Post 01 Aug 2010, 20:43

jadi inget tutor2 lama gw yg lupa dibackup waktu pindah hostingan T.T


User avatar
zitux
Contact:

Post 03 Aug 2010, 09:13

Rh354 wrote:jadi inget tutor2 lama gw yg lupa dibackup waktu pindah hostingan T.T
gak nemuin titik temu nya ya :D


User avatar
Rh354

Post 06 Aug 2010, 13:14

zitux wrote:
Rh354 wrote:jadi inget tutor2 lama gw yg lupa dibackup waktu pindah hostingan T.T
gak nemuin titik temu nya ya :D
mksdnya :confused:


User avatar
sabar

Post 12 Aug 2010, 18:50

mlm om2 linux dan master2

aku mau nanya nich

squid ku terinstal di mesin ubuntu 10.4 desktop
degan spek
prosesor 3.1 ghz
ram 512
hardisk 40

dengan config :
http_port 8080 transparent
hierarchy_stoplist cgi-bin ? localhost
acl QUERY urlpath_regex cgi-bin \? localhost
no_cache deny QUERY


cache_mem 8 MB
server_http11 on

maximum_object_size 128 MB
maximum_object_size_in_memory 32 KB
cache_swap_low 98%
cache_swap_high 99%
cache_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF
ipcache_size 8192
fqdncache_size 8192
ipcache_low 98
ipcache_high 99
cache_dir aufs /usr/local/squid 10400 48 256
cache_access_log /usr/local/squid/access.log
cache_log /usr/local/squid/cache.log
mime_table /usr/share/squid/mime.conf
#pid_filename /var/run/squid.pid
#coredump_dir /var/spool/squid/
log_fqdn off
log_icp_queries off
buffered_logs off
emulate_httpd_log off
ftp_list_width 32
ftp_passive on
ftp_sanitycheck on
dns_nameservers 202.134.1.10 125.160.2.162
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
refresh_pattern -i . 180 20% 4320

rcache deny QUERY
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i \.(gif|png|jp?g|ico|bmp|tiff?)$ 10080 95% 43200 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i \.(rpm|cab|deb|exe|msi|msu|zip|tar|gz|tgz|rar|bin|7z|doc?|xls?|ppt?|pdf|nth|psd|sis)$ 10080 90% 43200 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i \.(avi|iso|wav|mid|mp?|mpeg|mov|3gp|wm?|swf|flv|x-flv|axd)$ 43200 95% 432000 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i \.(html|htm|css|js)$ 1440 75% 40320
refresh_pattern -i \.index.(html|htm)$ 0 75% 10080
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 1440 90% 10080




quick_abort_min 0 KB
quick_abort_max 0 KB
quick_abort_pct 98

#==============================================
# ACL section
#==============================================
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localnet src 192.168.180.0/255.255.255.0
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 563 # https, snews
acl Safe_ports port 80 81 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl PURGE method PURGE
acl POST method POST
acl GETONLY method GET
acl CONNECT method CONNECT
always_direct allow localnet localhost
always_direct deny all
http_access allow manager all
http_access allow Safe_ports
http_access allow SSL_ports
http_access allow purge localhost
http_access deny purge
http_access allow localhost
http_access allow localnet
http_access deny all
http_reply_access allow all
http_reply_access deny all
miss_access allow localnet
miss_access deny all
header_access Accept-Encoding deny all
logfile_rotate 7
negative_ttl 2 minutes
client_persistent_connections on
server_persistent_connections on
store_avg_object_size 13 KB
store_objects_per_bucket 10
pipeline_prefetch on
forwarded_for on
vary_ignore_expire on
reload_into_ims on
nonhierarchical_direct off
prefer_direct off
memory_pools off
ie_refresh on
cache_mgr squid
cachemgr_passwd 1234 all
cache_effective_user squid
cache_effective_group squid
visible_hostname teess

udah seminggu tapi koq miss teyus bingung :-(

1281613693.512 923 192.168.180.104 TCP_MISS/200 467 GET http://pixel.facebook.com/ajax/apps/usage_update.php? - DIRECT/69.63.189.11 image/png
1281613713.020 479 192.168.180.104 TCP_MISS/200 612 POST http://ubuntu-indonesia.com/forums/ubbthreads.php - DIRECT/113.197.35.151 text/xml
1281613719.236 55361 192.168.180.104 TCP_MISS/200 255 GET http://0.66.channel.facebook.com/x/2536 ... 77027772=0 - DIRECT/66.220.145.39 text/plain
1281613730.376 55668 192.168.180.104 TCP_MISS/200 280 GET http://0.66.channel.facebook.com/x/2540 ... 77027772=0 - DIRECT/66.220.145.39 text/plain
1281613739.525 55375 192.168.180.104 TCP_MISS/200 280 GET http://3.66.channel.facebook.com/x/2203 ... 77027772=0 - DIRECT/66.220.145.39 text/plain
1281613743.819 462 192.168.180.104 TCP_MISS/200 612 POST http://ubuntu-indonesia.com/forums/ubbthreads.php - DIRECT/113.197.35.151 text/xml
1281613745.397 860 192.168.180.104 TCP_MISS/200 511 POST http://facebook.mafiawars.com/mwfb/sf_updater.php - DIRECT/74.114.8.80 text/html
1281613747.106 923 192.168.180.104 TCP_MISS/200 375 GET http://zbar.zynga.com/counters/fetch_counters.php? - DIRECT/174.129.40.202 text/html
1281613755.489 1013 192.168.180.104 TCP_MISS/200 833 POST http://apps.facebook.com/ajax/chat/buddy_list.php? - DIRECT/66.220.153.23 application/x-javascript



mohon di koreksi biar tidak tersesat di jalan

salam
sabar


User avatar
MasDjo
Contact:

Post 13 Aug 2010, 10:22

Sebenarnya cache squid lebih baik dibuatkan partisi tersendiri, supaya akses file cache nya lebih cepat... CMIIW

Coba cache di RAM dikecilkan,

maximum_object_size_in_memory 32 KB
menjadi
maximum_object_size_in_memory 512 bytes ( atau 1 s/d 4 KB, dicoba-coba saja :grin: )

juga :
cache_dir aufs /usr/local/squid 10400 48 256
menjadi
cache_dir aufs /usr/local/squid 10400 24 256

dari rumus 'umum' :
(((10400000/13)/256)/256)*2 = 24.4 == 24

stop squid, hapus/kosongkan cache dir nya trus build lagi cache dir nya :

Code: Select all

#service squid stop
#rm -rf /usr/local/squid/*
#squid -z
#service squid start
Dari saya cuma itu, maklum baru bisa copy & paste :grin:


User avatar
sabar

Post 13 Aug 2010, 19:46

Teng_q Om udah ngebalas

lagsung praktek,,,, hasilnya akan sy posting lagi
satu lagi nich om, selain perintah tail -f untuk melihat performa squid apalagi yach ???
maklum baru belajar ubuntu dengan squid :-)


User avatar
sabar

Post 22 Aug 2010, 17:47

mas, om, kk, cemua ,,,, help nich,,,, masih teyus miss sdh 1 minggu run :( :(
rencana mau nambah hardisk biar cachenya ke hardisk baru
perintahnya bgaimana yach



mohon bantuannya biar tidak tersesar di jalan


User avatar
Rh354

Post 23 Aug 2010, 08:19

sabar wrote:mas, om, kk, cemua ,,,, help nich,,,, masih teyus miss sdh 1 minggu run :( :(
rencana mau nambah hardisk biar cachenya ke hardisk baru
perintahnya bgaimana yach



mohon bantuannya biar tidak tersesar di jalan
konfigurasi squid nya gw liat koq kek ada yg salah n dobel2 y...

maklum nubi :)


User avatar
sabar

Post 23 Aug 2010, 19:32

bagian yang mana om ?????


User avatar
sabar

Post 28 Aug 2010, 23:26

malam om,,,KK,,,Mbah,,, Master tak henti-hentinya saya bertanya ke forum ini agar sy tidak tersesat

squid ku terinstal di mesin ubuntu 10.04 desktp dg spek :
intel4 3.6 ghz
ram 512
hardisk 40

config :
#conf 28 agustus 2010#
http_port 8080 transparent
hierarchy_stoplist cgi-bin ? localhost
acl QUERY urlpath_regex cgi-bin \? localhost
no_cache deny QUERY


cache_mem 8 MB
server_http11 on

maximum_object_size 128 MB
maximum_object_size_in_memory 512 bytes
cache_swap_low 98%
cache_swap_high 99%
cache_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF
ipcache_size 2048
fqdncache_size 2048
ipcache_low 98
ipcache_high 99
cache_dir aufs /usr/local/squid 10400 24 256
cache_access_log /usr/local/squid/access.log
cache_log /usr/local/squid/cache.log
mime_table /usr/share/squid/mime.conf
#pid_filename /var/run/squid.pid
#coredump_dir /var/spool/squid/
log_fqdn off
log_icp_queries off
buffered_logs off
emulate_httpd_log off
ftp_list_width 32
ftp_passive on
ftp_sanitycheck on
dns_nameservers 202.134.1.10 125.160.2.162
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
refresh_pattern -i . 180 20% 4320

cache deny QUERY

refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i \.(gif|png|jp?g|ico|bmp|tiff?)$ 10080 95% 43200 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i \.(rpm|cab|deb|exe|msi|msu|zip|tar|gz|tgz|rar|bin|7z|doc?|xls?|ppt?|pdf|nth|psd|sis)$ 10080 90% 43200 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i \.(avi|iso|wav|mid|mp?|mpeg|mov|3gp|wm?|swf|flv|x-flv|axd)$ 43200 95% 432000 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i \.(html|htm|css|js)$ 1440 75% 40320
refresh_pattern -i \.index.(html|htm)$ 0 75% 10080
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 1440 90% 10080


quick_abort_min 0 KB
quick_abort_max 0 KB
quick_abort_pct 98

#==============================================
# ACL section
#==============================================
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localnet src 192.168.180.0/255.255.255.0
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 563 # https, snews
acl Safe_ports port 80 81 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl PURGE method PURGE
acl POST method POST
acl GETONLY method GET
acl CONNECT method CONNECT
always_direct allow localnet localhost
always_direct deny all
http_access allow manager
http_reply_access allow localhost
http_access allow Safe_ports
http_access allow SSL_ports
http_access allow purge localhost
http_access deny purge
http_access allow localhost
http_access allow localnet
http_access deny all
http_reply_access allow all
http_reply_access deny all
miss_access allow localnet
miss_access deny all
header_access Accept-Encoding deny all
logfile_rotate 7
negative_ttl 2 minutes
client_persistent_connections on
server_persistent_connections on
store_avg_object_size 13 KB
store_objects_per_bucket 10
pipeline_prefetch on
forwarded_for on
vary_ignore_expire on
reload_into_ims on
nonhierarchical_direct off
prefer_direct off
memory_pools off
#ie_refresh on
cache_mgr squid
cachemgr_passwd 1234 all
cache_effective_user squid
cache_effective_group squid
visible_hostname tesss

icp_hit_stale on
query_icmp on


Squid Object Cache: Version 2.7.STABLE7
Start Time: Sat, 28 Aug 2010 15:57:12 GMT
Current Time: Sat, 28 Aug 2010 16:18:27 GMT
Connection information for squid:
Number of clients accessing cache: 2
Number of HTTP requests received: 739
Number of ICP messages received: 0
Number of ICP messages sent: 0
Number of queued ICP replies: 0
Number of HTCP messages received: 0
Number of HTCP messages sent: 0
Request failure ratio: 0.00
Average HTTP requests per minute since start: 34.8
Average ICP messages per minute since start: 0.0
Select loop called: 18913 times, 67.442 ms avg
Cache information for squid:
Request Hit Ratios: 5min: 2.1%, 60min: 3.9%
Byte Hit Ratios: 5min: -1.1%, 60min: 8.5%
Request Memory Hit Ratios: 5min: 0.0%, 60min: 0.0%
Request Disk Hit Ratios: 5min: 0.0%, 60min: 27.6%
Storage Swap size: 55564 KB
Storage Mem size: 1288 KB
Mean Object Size: 23.78 KB
Requests given to unlinkd: 0
Median Service Times (seconds) 5 min 60 min:
HTTP Requests (All): 0.64968 0.58309
Cache Misses: 0.68577 0.61549
Cache Hits: 0.00000 0.01469
Near Hits: 0.00000 0.30459
Not-Modified Replies: 0.00000 0.00000
DNS Lookups: 0.06364 0.06364
ICP Queries: 0.00000 0.00000
Resource usage for squid:
UP Time: 1275.527 seconds
CPU Time: 1.664 seconds
CPU Usage: 0.13%
CPU Usage, 5 minute avg: 0.06%
CPU Usage, 60 minute avg: 0.13%
Process Data Segment Size via sbrk(): 4140 KB
Maximum Resident Size: 25664 KB
Page faults with physical i/o: 129
Memory usage for squid via mallinfo():
Total space in arena: 4140 KB
Ordinary blocks: 4005 KB 267 blks
Small blocks: 0 KB 0 blks
Holding blocks: 796 KB 2 blks
Free Small blocks: 0 KB
Free Ordinary blocks: 134 KB
Total in use: 4801 KB 97%
Total free: 134 KB 3%
Total size: 4936 KB
Memory accounted for:
Total accounted: 1768 KB
memPoolAlloc calls: 133221
memPoolFree calls: 121636
File descriptor usage for squid:
Maximum number of file descriptors: 1024
Largest file desc currently in use: 30
Number of file desc currently in use: 19
Files queued for open: 0
Available number of file descriptors: 1005
Reserved number of file descriptors: 100
Store Disk files open: 0
IO loop method: epoll
Internal Data Structures:
2368 StoreEntries
324 StoreEntries with MemObjects
321 Hot Object Cache Items
2337 on-disk objects


mohon para master menilai, melihat, dan koreksi agar tidak tersesat dijalan lagi


User avatar
tripod_NA
Contact:

Post 29 Aug 2010, 08:36

trus yang ditanyakan apa? itu software untuk mail server bukan ya? maaf kl boleh tau,gmna cara memulai bikin mail server gan? maklum masih amatir ni bru pke linux


User avatar
MasDjo
Contact:

Post 29 Aug 2010, 09:54

@bro sabar, mending trit yg lama dilanjutkan, jangan buat trit baru yg sejenis, ok :)

Trit ini saya gabung dg Help Squid Hit Lemah


User avatar
sabar

Post 29 Aug 2010, 14:11

sory om soalnya udah nga ada yang replay jadi bikin trit baru lagi ????


User avatar
zitux
Contact:

Post 29 Aug 2010, 14:32

pake acara

Image

dan

Image


mending dari pada dotrit :grin:
mas sabar masih kurang sabar kykna ini :grin: peace.... :grin:


User avatar
MasDjo
Contact:

Post 29 Aug 2010, 15:24

Saya pake mesin Pentium 3 733 dg RAM 320 MB HDD 20 GB ATA, Ubuntu server 9.04 + Squid 2.7 Stable 9 ( compile sendiri )
Dengan konfigurasi hasil copas sana-sini ( :grin: ) yg penting jalan hehehe, sbb :
SQUID.CONF :
[spoiler]

Code: Select all

http_port 3128 transparent
server_http11 on
hierarchy_stoplist cgi-bin ? .js .jsp
acl QUERY urlpath_regex cgi-bin \? .js .jsp
no_cache deny QUERY
cache_mem 8 MB
cache_swap_low 98
cache_swap_high 99
max_filedesc 8192
maximum_object_size 64 MB
minimum_object_size 0 KB
maximum_object_size_in_memory 512 bytes
ipcache_size 4096
ipcache_low 98
ipcache_high 99
fqdncache_size 4096
cache_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF
cache_dir aufs /proxy1 12000 28 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log none
pid_filename /var/run/squid.pid
dns_nameservers /etc/resolv.conf
cache_swap_log /var/log/squid/swap.state
emulate_httpd_log on
hosts_file /etc/hosts
negative_ttl 1 minutes
half_closed_clients off

acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563              # https, snews
acl SSL_ports port 873                  # rsync
acl SSL_ports port 10000                # webmin
acl Safe_ports port 80                  # http
acl Safe_ports port 21                  # ftp
acl Safe_ports port 443 563             # https, snews
acl Safe_ports port 70                  # gopher
acl Safe_ports port 210                 # wais
acl Safe_ports port 1025-65535          # unregistered ports
acl Safe_ports port 280                 # http-mgmt
acl Safe_ports port 488                 # gss-http
acl Safe_ports port 591                 # filemaker
acl Safe_ports port 777                 # multiling http
acl Safe_ports port 631                 # cups
acl Safe_ports port 873                 # rsync
acl Safe_ports port 901                 # SWAT
acl Safe_ports port 110                 # evolution
acl Safe_ports port 25                  # evolution
acl Safe_ports port 995                 # thunderbird
acl Safe_ports port 587                 # thunderbird
acl Safe_ports port 10000               # webmin
acl purge method PURGE
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports !SSL_ports
http_access deny CONNECT !SSL_ports !Safe_ports

#################################################################
# Refresh Pattern
##################################################################
refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern ^http:          720     90%     86400
refresh_pattern -i \.(gif|png|jpg|jpeg|ico)$ 10080 90% 43200 override-expire ignore-no-cache ignore-private
refresh_pattern -i \.(iso|avi|wav|mp3|mp4|mpeg|mpg|swf|flv|x-flv)$ 43200 90% 432000 override-expire ignore-no-cache ignore-private
refresh_pattern -i \.(deb|rpm|exe|ram|bin|pdf|ppt|doc|tiff)$ 10080 90% 43200 override-expire ignore-no-cache ignore-private
refresh_pattern -i \.(zip|gz|arj|lha|lzh|tar|tgz|cab|rar)$ 10080 95% 43200 override-expire ignore-no-cache ignore-private
refresh_pattern -i \.(html|htm|css|js|php|asp|aspx|cgi) 1440 40% 40320
refresh_pattern .               0       20%     4320


##############################
# SNMP
snmp_port 3401
acl snmpsquid snmp_community public
snmp_access allow snmpsquid localhost
snmp_access deny all

acl punyaku-net src 192.168.0.0/24  ## Sesuaikan
http_access allow punyaku-net
http_access deny all
http_reply_access allow all
icp_access deny all
always_direct deny all

acl lokalku dst 192.168.0.0/24
cache deny lokalku
cache_mgr djksrs@gmail.com
visible_hostname bluesky-net.co.cc
cache_effective_user proxy
cache_effective_group proxy
coredump_dir /var/spool/squid
shutdown_lifetime 10 seconds
logfile_rotate 14

###Marking ZPH ----> Bandwidth Managemen
zph_mode tos
zph_local 0x04
#zph_local 0x10
zph_parent 0
zph_option 136

####Redirect program / filter porno ---> SquidQuard
redirect_program /usr/bin/squidGuard -c /etc/squid/squidGuard.conf
[/spoiler]

Cek dg : squidclient mgr:info
[spoiler]

Code: Select all

HTTP/1.0 200 OK
Server: squid/2.7.STABLE9
Date: Sun, 29 Aug 2010 08:16:39 GMT
Content-Type: text/plain
Expires: Sun, 29 Aug 2010 08:16:39 GMT
X-Cache: MISS from bluesky-net.co.cc
X-Cache-Lookup: MISS from bluesky-net.co.cc:3128
Via: 1.0 bluesky-net.co.cc:3128 (squid/2.7.STABLE9)
Connection: close

Squid Object Cache: Version 2.7.STABLE9
Start Time:	Sun, 29 Aug 2010 01:34:51 GMT
Current Time:	Sun, 29 Aug 2010 08:16:39 GMT
Connection information for squid:
	Number of clients accessing cache:	8
	Number of HTTP requests received:	38572
	Number of ICP messages received:	0
	Number of ICP messages sent:	0
	Number of queued ICP replies:	0
	Number of HTCP messages received:	0
	Number of HTCP messages sent:	0
	Request failure ratio:	 0.00
	Average HTTP requests per minute since start:	96.0
	Average ICP messages per minute since start:	0.0
	Select loop called: 602670 times, 40.002 ms avg
Cache information for squid:
	Request Hit Ratios:	5min: 23.8%, 60min: 32.1%
	Byte Hit Ratios:	5min: 24.1%, 60min: 40.7%
	Request Memory Hit Ratios:	5min: 11.4%, 60min: 7.3%
	Request Disk Hit Ratios:	5min: 85.7%, 60min: 72.5%
	Storage Swap size:	2815776 KB
	Storage Mem size:	8148 KB
	Mean Object Size:	15.25 KB
	Requests given to unlinkd:	0
Median Service Times (seconds)  5 min    60 min:
	HTTP Requests (All):   0.20843  0.22004
	Cache Misses:          0.28853  0.37825
	Cache Hits:            0.00405  0.01309
	Near Hits:             0.00000  0.52331
	Not-Modified Replies:  0.00000  0.00865
	DNS Lookups:           0.03868  0.01852
	ICP Queries:           0.00000  0.00000
Resource usage for squid:
	UP Time:	24108.112 seconds
	CPU Time:	1226.380 seconds
	CPU Usage:	5.09%
	CPU Usage, 5 minute avg:	1.25%
	CPU Usage, 60 minute avg:	1.27%
	Process Data Segment Size via sbrk(): 33664 KB
	Maximum Resident Size: 0 KB
	Page faults with physical i/o: 1
Memory usage for squid via mallinfo():
	Total space in arena:   33664 KB
	Ordinary blocks:        33445 KB   2179 blks
	Small blocks:               0 KB      0 blks
	Holding blocks:          3540 KB      3 blks
	Free Small blocks:          0 KB
	Free Ordinary blocks:     218 KB
	Total in use:           36985 KB 99%
	Total free:               218 KB 1%
	Total size:             37204 KB
Memory accounted for:
	Total accounted:        24038 KB
	memPoolAlloc calls: 6683548
	memPoolFree calls: 6269548
File descriptor usage for squid:
	Maximum number of file descriptors:   8192
	Largest file desc currently in use:     83
	Number of file desc currently in use:   67
	Files queued for open:                   0
	Available number of file descriptors: 8125
	Reserved number of file descriptors:   100
	Store Disk files open:                   4
	IO loop method:                     epoll
Internal Data Structures:
	184681 StoreEntries
	  1972 StoreEntries with MemObjects
	  1967 Hot Object Cache Items
	184582 on-disk objects
[/spoiler]

Jangan malu copas, yg penting bisa, tapi harus disesuaikan dikit dg kondisi kita :grin:


User avatar
sabar

Post 29 Aug 2010, 19:45

@Zitux : sabar kan cmn sampai huru R hehehehe

kalau bgini :
Cache information for squid:
Request Hit Ratios: 5min: 65.4%, 60min: 62.5%
Byte Hit Ratios: 5min: 67.0%, 60min: 65.1%
Request Memory Hit Ratios: 5min: 0.2%, 60min: 0.1%
Request Disk Hit Ratios: 5min: 95.7%, 60min: 95.1%
Storage Swap size: 64868 KB
Storage Mem size: 768 KB
Mean Object Size: 18.49 KB
Requests given to unlinkd: 0

udah maksimal ngak tp kalau di cek pake tail-f masih banyak yang miss, trus cek whatismyip koq squidnya nga kliatan

mari saling berbagi di bulan suci ini ;-)


User avatar
MasDjo
Contact:

Post 29 Aug 2010, 20:54

@sabar : kayaknya sudah top markotop tuh ...hehehe :D
Mungkin yg miss tsb memang obyek yg tidak di-cache oleh squid jadi selalu diarahkan langsung ke internet.... CMIIW
Kalo saya sih berpedoman dari hasil : squidclient mgr:info

Mana nih para mastah squid, tolong diberi penjelasan biar lebih manstab :grin:


User avatar
sabar

Post 29 Aug 2010, 21:29

kalau masalah cek whatismyip koq squidnya tidak kliatan beda settingan pertamnya squidnya kliatan ????? :(


User avatar
zitux
Contact:

Post 29 Aug 2010, 22:09

sependapat dgn masdjo klo hit semua pasti kuenceng banget tp kan lokal semua :grin: gak " internetan" dunk nama nya klo brosing dari server saja
ntar ada pertanyaan dari pelanggan "mas facebook ku kok gak ganti2 gambare " :D
nambahi untuk squid squid disini klo saya pribadi Hardware sangat server berpengaruh bukan berarti harga mahal lho
dah banyak kok mas yg bahas squid disini :grin:
@masdjo speddy nya sudah pake paket biz ya ip nya kok berubah ?


User avatar
sabar

Post 29 Aug 2010, 22:54

@zitux : benar juga kalau semuia hit tidak usah internetan
jadi malu, maklum baru belajar ten_q for ALL atas bantuannya


User avatar
MasDjo
Contact:

Post 30 Aug 2010, 09:50

@zitux : saya pake spedy yg jam-jaman makanya ip nya belum dikasih yg fixed .... :grin:
maklum....warnet ecek-ecek :blush: :blush:


User avatar
sabar

Post 30 Aug 2010, 10:01

pagi all

mau nanya lagi nich
rencana mau nambah hardisk di squidku trus cara nambahinnya bgimana yach maklum baru belajar ubuntu terbiasa dengan win**
tolong step by stepnya


User avatar
zitux
Contact:

Post 30 Aug 2010, 17:49

@masdjo lagi cari2 info detek ip soale disini mentok paket game saja gak bisa milih yg aneh2 :(
dan ngapain bayar mahal klo yg murah masih mumpuni :grin:

@ mas sabar coba ya
tp cara ini belum pernah aq coba cuma secara logika saja
mohon dikoreksi ya

A.PARTISI untuk nubie

1.pasang HDD baru ke server
2.masukkan live CD ubuntu desktop
3.partisi dgn gparted HDD baru td


B: buat mount otomatis under CLI
Sudoers wrote:
Pertama buat direktori mount pointnya dolo.
Misalnya neh aq punya partisi space 40GB..
# mkdir /media/disk40
Atur permission..
# chgrp plugdev /media/disk40
# chmod 777 /media/disk40
# chmod +t /media/disk40

Nah tambahkan baris dibawah ini di /etc/fstab
/dev/sdb7 /media/disk40 ext3 defaults 0 2
ato klo file systemnya pake jenis lain ganti aja tuh ext3, asumsi saya sda7 adalah partisi 40gb make ext3

Save and exit! Abis itu testing..
# mount -a
Klo berhasil harusnya dengan perintah df -h keliatan ada baris /dev/sda7 yg termount di /media/disk40 klo gagal ngak ada coba lagi.

Klo berhasil sampai tahap ini restart komputernya harusnya uda termount otomatis tuh.
C.arahkan cache squid ke HDD baru

1.edit squid.conf
2.cari cache dir <--sesuaikan dgn letak mount point hdd baru
3.squid -k parse << untuk liat error / kesalahan squid.conf
4.squid -z

reboot dan testing :)


User avatar
sabar

Post 30 Aug 2010, 17:56

@zitux : Langsung Praktek kalau ada hambatan aku ke mari lagi yach :)


User avatar
sabar

Post 30 Aug 2010, 21:13

KK udah coba seperti langkah diatas :
pas login ubuntu : media/disk40 is not ready yet or not present

root@khaira:~# mount -a
mount: special device /dev/sdb7 does not exist

root@khaira:~# fdisk -l

Disk /dev/sda: 40.0 GB, 40016019456 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0001c8f9

Device Boot Start End Blocks Id System
/dev/sda1 * 1 4730 37989376 83 Linux
/dev/sda2 4730 4865 1086465 5 Extended
/dev/sda5 4730 4865 1086464 82 Linux swap / Solaris

Disk /dev/sdb: 40.1 GB, 40060403712 bytes
255 heads, 63 sectors/track, 4870 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000498b8

Device Boot Start End Blocks Id System
/dev/sdb1 1 4870 39118243+ 83 Linux


maksunya apa ?????


User avatar
zitux
Contact:

Post 30 Aug 2010, 21:29

disk40 << disesuaikan dgn label partisi yg dibuat td
sdb7 << disesuaikan dgn dimana letak partisi td berada di sd berapa ?
klo liat fdiks nya spt nya sdb1 adalah partisi chace nya ??


User avatar
sabar

Post 30 Aug 2010, 21:31

wah replaynya kilat hehehe langsung praktik


User avatar
sabar

Post 30 Aug 2010, 23:24

KK udah berhasil,,, tp binun pas edit conf squid

root@khaira:~# mkdir /media/disk40/squid
root@khaira:~# mkdir /media/disk40/squid/cache
root@khaira:~# touch /media/disk40/squid/cache.log
root@khaira:~# touch /media/disk40/squid/access.log
root@khaira:~# chown -Rf squid.squid /media/disk40/squid
root@khaira:~#
di squid conf :
cache_dir aufs /media/squid/cache 10400 24 256

squid -k parse :
WARNING: cache_dir /media/squid/cache: (2) No such file or directory
salahnya di mana yach ??? :(

jangan bosan berbagi :)


User avatar
thrvers
Contact:

Post 30 Aug 2010, 23:28

'
salah di squid.conf :D

cache_dir aufs /media/squid/cache 10400 24 256
sharusnya
cache_dir aufs /media/disk40/squid 10400 24 256

* CMIIW *


User avatar
sabar

Post 30 Aug 2010, 23:41

root@khaira:~# mkdir /media/disk40/squid
root@khaira:~# mkdir /media/disk40/squid/cache
root@khaira:~# touch /media/disk40/squid/cache.log
root@khaira:~# touch /media/disk40/squid/access.log
root@khaira:~# chown -Rf squid.squid /media/disk40/squid
root@khaira:~#
di squid conf :
cache_dir aufs /media/disk40/squid 10400 24 256

FATAL: Failed to make swap directory /media/disk40/squid: (13) Permission denied

help lagi donk


User avatar
zitux
Contact:

Post 30 Aug 2010, 23:51

hak akses nya bro diperiksa
udah di chmod kan td :confused:


User avatar
sabar

Post 30 Aug 2010, 23:56

root@khaira:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 36G 2.9G 32G 9% /
none 178M 272K 178M 1% /dev
none 182M 752K 181M 1% /dev/shm
none 182M 92K 182M 1% /var/run
none 182M 0 182M 0% /var/lock
none 182M 0 182M 0% /lib/init/rw
/dev/sdb1 37G 177M 35G 1% /media/disk40

apakah hardiks saya udah betul nih :(

sory merepotkan baru belajar


Post Reply

Who is online

Users browsing this forum: No registered users and 106 guests