Minggu, 07 Desember 2014

dari sebelah

Install htproxy di ubuntu server 64 bit versi 12.04 LTS ( Youtube tercache )
Terimakasih kepada :
http://learningbytutz.blogspot.com/2013/12/install-htproxy-di-ubuntu-server-64-bit.html

4. Cari file fstab di /etc/fstab, lalu edit. (INGAT HANYA DRIVE CACHE)
cari line yang ada /cache nya dan ubah angka yang semula 0 2 menjadi 0 0 seperti ini :
# /cache was on /dev/sda4 during installation
UUID=1dd7c566-6a03-4634-99a9-02f0a0eef85f /cache reiserfs noatime,relatime 0 0

5. Install paket yang dibutuhkan
sudo apt-get update
sudo apt-get install squid squidclient squid-cgi
sudo apt-get install gcc
sudo apt-get install build-essential
sudo apt-get install sharutils
sudo apt-get install ccze
sudo apt-get install libzip-dev
sudo apt-get install automake1.9
sudo apt-get install multitail
sudo apt-get install acpid ( agar proses shutdown bisa dilakukan dgn menekan tombol power dipc )
sudo apt-get install libcap2 libcap2-dev ( package untuk tproxy)
sudo apt-get install libfile-readbackwards-perl

6. Lalu buang squid/lusca yang terinstall.

apt-get purge squid squid-common squid-cgi
apt-get purge squid3 &&
apt-get autoremove
dan buang filenya :
rm -rf /etc/squid
rm -f /usr/sbin/squid

7.Download package extract dan install :
cd /tmp/
32 bit sedot disini :
wget http://squid-proxy-pkg.googlecode.com/files/deb-htproxy_14942_i386.tar.bz2
64 bit sedot disini :
wget http://squid-proxy-pkg.googlecode.com/files/deb-htproxy_14942_x86-64.tar.bz2
Jika link diatas sudah gk valid bisa ambil dari sini :
32 bit :
http://www.4shared.com/file/P4_UUcTT/deb-htproxy_14942_i386tar.html
64 bit :
http://www.4shared.com/file/CkqP1QBV/deb-htproxy_14942_x86-64tar.html
32 bit install : tar xvf deb-htproxy_14942_i386.tar.bz2 && dpkg -i *.deb
64 bit install : tar xvf deb-htproxy_14942_x86-64.tar.bz2 && dpkg -i *.deb

8. Lalu cek apakah htproxy dan helper yang baru sudah terinstall, dengan perintah
#squid -v
#/usr/lib/squid/hikmah-teknologi.com -v

9.Jika sudah stop dulu servisnya agar kita bisa membuat cache_dir yang sesuai
/etc/init.d/squid stop

10. Lalu edit squid.conf , edit cache_dir , acl local net , cache_mem , maximum_object_size , dns_nameservers menurut settingan anda. Configurasi dari saya bisa anda download dari sini :
http://www.4shared.com/rar/IlDO2kiV/squid_nov_2013.html atau configurasi dari Master Rixum (FMI)sendiri :
http://www.4shared.com/rar/m-39yHay/htproxy_14942_yt_nov2013.html

11. Edit owner file di /etc/squid dari root ke proxy
chmod +x /etc/squid/rxm_cache.pl
chown proxy:proxy /etc/squid/rxm_cache.pl
chmod 777 /etc/squid/rxm_cache.pl
chown proxy:proxy /etc/squid/refresh_pattern.conf
chmod 777 /etc/squid/refresh_pattern.conf
chown proxy:proxy /etc/squid/squid.conf
chmod 777 /etc/squid/squid.conf
chown proxy:proxy /etc/squid/store_rewrite.conf
chmod 777 /etc/squid/store_rewrite.conf

Ini yang paling penting ubah owner folder cache dari root ke proxy :
chown proxy:proxy /cache chmod 777 /cache

12. Cek apakah ada configurasi yang error dengan perintah :
squid -k parse
squid -k reconfigure

13. Membuat folder-folder swap dan cache di dalam folder /cache yang telah ditentukan dg perintah :
squid -f /etc/squid/squid.conf -z

14. Jika sudah oke, jalankan servicesnya
/etc/init.d/squid start atau
squid -NDd1 && reboot

15. Cek apakah servis squid sudah jalan dengan perintah
netstat -pln |grep squid
Jika ada penampakan seperti ini :
tcp 0 0 0.0.0.0:3128 0.0.0.0:* LISTEN 909/(squid)
Berarti squid siap digunakan.

16. Test browsing dan cek access log
tail -f /var/log/squid/access.log | ccze
Note : untuk menghapus file cache tertentu squidclient -m PURGE ( link file tersebut )
contoh : squidclient -m PURGE http://122.102.49.132/audition/Update.ini
Untuk cek access log selain user root dengan perintah yang singkat bisa anda letakkan file di directory
/home/budi ( username )
buat file dengan putty dgn perintah :
touch cekcache
lalu edit dengan winscp, isi dengan :
sudo tail -f /var/log/squid/access.log | ccze
lalu ubah kepemilikannya dari root ke user tersebut :
sudo chown budi:budi /home/budi/cekcache
chmod 777 /home/budi/cekcache
nanti user tsb cukup menjalankan nya dgn perintah
./cekcache
Untuk perintah singkat hapus cache ikuti aja perintah seperti diatas dan buat file dgn nama
hapuscache dan isikan perintah berikut :
sudo /etc/init.d/squid stop
sudo rm -fdR /cache/*
sudo squid -f /etc/squid/squid.conf -z
sudo /etc/init.d/squid restart
jangan lupa ubah ownernya sudo
chown budi:budi /home/budi/hapuscache
sudo chmod 777 /home/budi/hapuscache

Tambahan : Saya lupa menambahkan configurasi untuk hide proxy agar tak terdeteksi di what'smyip
Tambahkan line berikut
disquid.conf :
#matikan kalau ingin terdeteksi di what'smyip
forwarded_for off
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

kunjungi juga blog
http://henrysie.blogspot.com/2013/12/share-htproxy-cara-mudah-install-proxy.html

Make Money at : http://bit.ly/copy_win
Make Money at : http://bit.ly/copy_win

Tidak ada komentar:

Posting Komentar