Tutorial ini hanya menjelaskan cara mengconfigurasi squid bukan cara menginstall squid dari .tar.gz karena di squid di fedora core 4 defaultnya sudah terinstall, jadi yang harus kita lakukan hanya mengconfigurasinya. yang perlu disiapin adalah berapa space yang dialokasikan buat squidnya dan bakal di tarok dimana.
misalnya
port : 3128 8080 3127 (tiga port)
space : 3 G (3072M)
alokasi di : /home/cache/squid
network yang diallowed untuk mengakses proxy : 172.17.3.0/24 dan 192.168.0.0/24 configurasi dari root:
1.cd /etc/squid
2.backup configurasi squidnya :
[root@cachak squid]#cp squid.conf squid.conf.org
[root@cachak squid]#cd 3.buat folder /home/cache/squid setelah itu ownernya digantikan ke user squid
[root@cachak ~]#mkdir -p /home/cache/squid
[root@cachak ~]#chown -R squid:squid /home/cache/squid 4.buat folder cache_dir
[root@cachak ~]#mkdir /home/cache/squid/spool
[root@cachak ~]#chown -R squid:squid /home/cache/squid 5.selanjutnya adalah mengconfigurasi squid.conf dan bagian2 yang perlu di edit dari squid.conf adalah
a. edit http_portnya yaitu bagian
# http_port 3128 menjadi
http_port 3128 8080 3127 b. edit access.lognya
# cache_access_log /var/log/squid/access.log menjadi
cache_access_log /home/cache/squid/access.log c. edit cache lognya
# cache_log /var/log/squid/cache.log menjadi
cache_log /home/cache/squid/cache.log d. edit cache_store_log
# cache_store_log /var/log/squid/store.log menjadi
cache_store_log /home/cache/squid/store.log e. edit memori yang dialokasikan buat menjalankan squidnya, sesuaikan dengan kemampuan squid servernya
# cache_mem 8 MB menjadi
cache_mem 16 MB f.edit cache dir nya, arahkan sesuai dengan langkah no 5 dan juga space alokasinya yaitu 3072 M
# cache_dir ufs /var/spool/squid 100 16 256 menjadi
cache_dir ufs /home/cache/squid/spool 3072 16 256 g.nah sekarang tinggal nambahin network yang mau di allowed untuk access proxy servernya
cari bagian :
#Recommended minimum configuration:
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
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 CONNECT method CONNECT dibawah acl localhost src 127.0.0.1/255.255.255.255, tambahkan network yang akan di allowed
acl net1 src 172.17.3.0/255.255.255.0
acl net2 src 192.168.0.0/255.255.255.0 setelah itu supaya net1 dan net2 td bisa mengakses squid maka tambahkan http_access allow
cari baris :
# And finally deny all other access to this proxy
http_access allow localhost
http_access deny all diantar http_access allow localhost dan http_access deny all tambahkan :
http_access allow net1
http_access allow net2 baris ini bisa ditarok di atas http_access allow localhost atau dibawah http_access allow localhost yang penting diatas http_access deny all
6.setelah itu simpen. lalu start squid nya
[root@cachak ~]#/etc/init.d/squid start 7.setelah itu gunakan testing squidnya menggunakan browser sambil di lihat acess log nya
[root@cachak ~]#tail -f /home/cache/squid/access.log