Squid adalah sebuah service yang digunakan sebagai proxy server dan web cache. Squid memiliki banyak jenis kegunaaan, mulai dari mempercepat server web dengan melakukan caching permintaan yang berulang-ulang, caching DNS, caching situs web dan lain-lain. untuk itu kami membuat tutorial cara Membersihkan Dan Create Ulang Cache Squid Proxy
Membersihkan Dan Create Ulang Cache Squid Proxy
- Step #1: Mencari lokasi direktori cache Squid
- Step #2: stop Squid & hapus cache direktori
- Step #3: Create ulang direktori cache-nya
- Step #4: Restart squid
- Step #5: periksa kembali apakah squid telah berjalan dengan baik
1 |
# cat /etc/squid/squid.conf | grep cache_dir |
outputnya akan seperti ini
1 |
cache_dir ufs /var/spool/squid 1000 16 256 |
1 |
# cat /etc/squid/squid.conf | grep cache_dir |
outputnya akan seperti ini
1 |
cache_dir ufs /var/spool/squid 1000 16 256 |
1 |
# squid -k shutdown |
hapus cache direktori
1 2 |
# rm -rf /path/to/dir/cache/ # rm -rf /var/spool/squid/ |
1 2 |
# mkdir /var/spool/squid # chown squid:squid /var/spool/squid |
membuat cache_dir
1 |
# squid -z |
outputnya
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
2014/08/24 04:24:19| Making directories in /var/spool/squid/00 2014/08/24 04:24:19| Making directories in /var/spool/squid/01 2014/08/24 04:24:19| Making directories in /var/spool/squid/02 2014/08/24 04:24:20| Making directories in /var/spool/squid/03 2014/08/24 04:24:20| Making directories in /var/spool/squid/04 2014/08/24 04:24:20| Making directories in /var/spool/squid/05 2014/08/24 04:24:20| Making directories in /var/spool/squid/06 2014/08/24 04:24:20| Making directories in /var/spool/squid/07 2014/08/24 04:24:20| Making directories in /var/spool/squid/08 2014/08/24 04:24:20| Making directories in /var/spool/squid/09 2014/08/24 04:24:20| Making directories in /var/spool/squid/0A 2014/08/24 04:24:20| Making directories in /var/spool/squid/0B 2014/08/24 04:24:20| Making directories in /var/spool/squid/0C 2014/08/24 04:24:20| Making directories in /var/spool/squid/0D 2014/08/24 04:24:20| Making directories in /var/spool/squid/0E 2014/08/24 04:24:20| Making directories in /var/spool/squid/0F |
1 |
# service squid start |
1 2 3 |
# netstat -tulpn | grep :3128 # tail -f /var/log/squid/access.log # tail -f /var/log/squid/cache.log |
Selamat mencoba artikel GemarOprek 🙂