Advertisement
samuderapase

install squid otomatis

Dec 28th, 2011
350
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. #instalasi squid proxy in debian otomatis
  3. #code by samuderapase
  4.  
  5. squid=instalasi squid proxy in debian
  6. echo $squid
  7. sleep 3
  8.  
  9. sudo aptitude update                            #update repo
  10. sudo aptitude install squid                     #perintah menginstalasi squid
  11. aptitude install squid squidclient squid-cgi   
  12. aptitude install ccze
  13.  
  14. sleep 4
  15. squid=Membuat Directory cache
  16. echo =============================================================
  17. echo $squid
  18.  
  19. mkdir /cache1 && mkdir /cache2 && mkdir /cache3 && mkdir /cache4
  20. touch /var/log/squid/access.log
  21. touch /var/log/squid/cache.log
  22.  
  23. echo"Mengaktifkan directory cache"
  24.  
  25. chown -R proxy.proxy /cache1
  26. chown -R proxy.proxy /cache2
  27. chown -R proxy.proxy /cache3
  28. chown -R proxy.proxy /cache4
  29. chown -R proxy.proxy /var/log/squid/access.log
  30.  
  31. sleep 3
  32. echo"Edit Squid.conf"
  33. wget -c http://samuderapase.ucoz.de/succescrew/squid.conf >/etc/squid/ #(sesuaikan dengan jaringan,memory,hdd dari PC Proxy anda)
  34.  
  35. sleep 4
  36.  
  37. nano /etc/squid/squid.conf
  38.  
  39. echo"Pengecekan file Squid.conf"
  40. squid -k parse
  41.  
  42. echo"membuat direktori swap"
  43. squid -z
  44. squid -DFY
  45.  
  46. echo"Reboot Squid Proxy"
  47. /etc/init.d/squid restart
  48.  
  49. echo"cek squid apakah sudah berfungsi" sleep 3  "========================================================"
  50. ps -ax|grep squid
  51.  
  52. echo"Terakhir jalankan perintah :" sleep 4
  53.  
  54. iptables -t nat -A POSTROUTING -j MASQUERADE
  55.  
  56. #thanks ^_^
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement