install squid otomatis di Debian

  1.  #!/bin/bash
  2. #instalasi squid proxy in debian otomatis
  3. #code by samuderapase
  4. squid=instalasi squid proxy in debian
  5. echo $squid
  6. sleep 3
  7. sudo aptitude update                                                    #update repo
  8. sudo aptitude install squid                                             #perintah menginstalasi squid
  9. aptitude install squid squidclient squid-cgi   
  10. aptitude install ccze
  11. sleep 4
  12. squid=Membuat Directory cache
  13. echo =============================================================
  14. echo $squid
  15. mkdir /cache1 && mkdir /cache2 && mkdir /cache3 && mkdir /cache4
  16. touch /var/log/squid/access.log
  17. touch /var/log/squid/cache.log
  18. echo"Mengaktifkan directory cache"
  19. chown -R proxy.proxy /cache1
  20. chown -R proxy.proxy /cache2
  21. chown -R proxy.proxy /cache3
  22. chown -R proxy.proxy /cache4
  23. chown -R proxy.proxy /var/log/squid/access.log
  24. sleep 3
  25. echo"Edit Squid.conf"
  26. wget -c http://samuderapase.ucoz.de/succescrew/squid.conf >/etc/squid/ #(sesuaikan dengan jaringan,memory,hdd dari PC Proxy anda)
  27. sleep 4
  28. nano /etc/squid/squid.conf
  29. echo"Pengecekan file Squid.conf"
  30. squid -k parse
  31. echo"membuat direktori swap"
  32. squid -z
  33. squid -DFY
  34. echo"Reboot Squid Proxy"
  35. /etc/init.d/squid restart
  36. echo"cek squid apakah sudah berfungsi" sleep 3  "========================================================"
  37. ps -ax|grep squid
  38. echo"Terakhir jalankan perintah :" sleep 4
  39. iptables -t nat -A POSTROUTING -j MASQUERADE
  40. #thanks ^_^
      


0 Response to "install squid otomatis di Debian"

Post a Comment