# ======================================================= #
# 20 langkah instalasi proxy lusca di ubuntu 12.04 / 14.04 server
# Berjalan default pada port 3126, silahkan ganti sesuai keinginan anda
# Tutorial by jinho diaz
# ======================================================= #
Pastikan ubuntu server sudah terinstal dengan baik dan dapat ping ke salah satu situs.
Selanjutnya silahkan remote Ubuntu server anda Dengan PuTTY.
1. Update data yang diperlukan, copy paste script dibawah ini ke terminal putty :
apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y && apt-get install squid -y && apt-get install squid squidclient squid-cgi -y && apt-get install gcc -y && apt-get install build-essential -y && apt-get install sharutils -y && apt-get install ccze -y && apt-get install libzip-dev -y && apt-get install automake1.9 -y && wget https://www.dropbox.com/s/crl20s4r7ha78y8/LUSCA_PRO.tar.gz && tar xzvf LUSCA_PRO.tar.gz && cd LUSCA_PRO/ && make distclean
2. Lakukan perintah compile, copy paste Kode nya ke terminal putty :
./configure --prefix=/usr --exec_prefix=/usr --bindir=/usr/sbin --sbindir=/usr/sbin --libexecdir=/usr/lib/squid --sysconfdir=/etc/squid --localstatedir=/var/spool/squid --datadir=/usr/share/squid --enable-http-gzip --enable-async-io=24 --with-aufs-threads=24 --with-pthreads --enable-storeio=aufs --enable-linux-netfilter --enable-arp-acl --enable-epoll --enable-removal-policies=heap --with-aio --with-dl --enable-snmp --enable-delay-pools --enable-htcp --enable-cache-digests --disable-unlinkd --enable-large-cache-files --with-large-files --enable-err-languages=English --enable-default-err-language=English --with-maxfd=65536 && make && make install
3. Beri akses proxy pada direktory daemon squid :
sudo chmod 777 /usr/share/squid
4. Buatlah direktory untuk tempat cache anda, disini saya contohkan 9 cache, silahkan sesuaikan :
mkdir /cache-1 && mkdir /cache-2 && mkdir /cache-3 && mkdir /cache-4 && mkdir /cache-5 && mkdir /cache-6 && mkdir /cache-7 && mkdir /cache-8 && mkdir /cache-9
5. Beri akses proxy pada direktory cache :
chown proxy:proxy /cache-* && chmod 777 /cache-*
6. Buat file log squid dan beri akses proxy :
mkdir /var/log/squid && chmod 777 /var/log/squid
touch /var/log/squid/access.log && touch /var/log/squid/cache.log
sudo chmod 777 /var/log/squid/access.log
sudo chmod 777 /var/log/squid/cache.log
7. Masuk ke direktory squid engine :
cd /etc/init.d
8. Download dan extract engine squid :
wget https://www.dropbox.com/s/oh60zwaztpwed55/squideng.tar.gz && tar xzvf squideng.tar.gz
9. Beri akses proxy pada engine dan hentikan proses sementara :
sudo chmod +x /etc/init.d/squid && /etc/init.d/squid stop
10.Masuk ke direktory squid :
cd /etc/squid
11. Download config squid :
wget https://www.dropbox.com/s/jfaqbzlrde00njn/squidconf.tar.gz && tar xzvf squidconf.tar.gz
12. Beri hak akses proxy pada file squid.conf dan storeurl.pl :
chown proxy:proxy /etc/squid/storeurl.pl && chmod 777 /etc/squid/storeurl.pl && chown proxy:proxy /etc/squid/squid.conf && chmod 777 /etc/squid/squid.conf
13. copykan file yg di perlukan, kemudian Silahkan edit squid.conf, terutama dibagian port (proxy berjalan di port 3126), cache squid, dan localnet sesuai dengan jaringan LAN anda, ketik :
cp /etc/squid/mime.conf /usr/share/squid
chown proxy:proxy /usr/share/squid/mime.conf
chmod 777 /usr/share/squid/mime.conf
nano /etc/squid/squid.conf
14. Jika sudah selesai mengedit, simpan dan keluar, caranya tekan ctrl+x, lalu tekan y
15. Jalankan setting squid :
squid -f /etc/squid/squid.conf -z && /etc/init.d/squid restart
16. Periksa apakah ada pesan kesalahan instalasi :
squid -k parse
squid -k reconfigure
17. Periksa apakah squid sudah berjalan :
squid -NDd1
18. Ganti file sysctl dan Lakukan soft restart pada jaringan :
mv /etc/sysctl.conf sysctl.conf.backup
cd /etc/
wget https://www.dropbox.com/s/1dndqjl5y3bs1rs/sysctl.conf
sudo sysctl -p
sudo /etc/init.d/networking restart
19. Atur crontab agar squid berjalan otomatis saat komputer restart :
cd /usr/sbin/
wget https://www.dropbox.com/s/mzl61mw53cqvk3h/squidst.sh
wget https://www.dropbox.com/s/4jbnlqjea0zxxid/squid.tgz
chmod 777 /usr/sbin/squidst.sh && chmod 777 /usr/sbin/squid.tgz
echo 0 */1 * * * squidst.sh >> /var/spool/cron/root
echo 0 */1 * * * service squid restart >> /var/spool/cron/root
echo 30 8 * * * /usr/sbin/squidst.sh >> /var/spool/cron/crontabs/root
20. Jika semua sudah selesai, silahkan lihat hit nya :
tail -f /var/log/squid/access.log | ccze
# Tutorial by jinho on squid lusca high performance
# Download step installation in txt file, here
# 20 langkah instalasi proxy lusca di ubuntu 12.04 / 14.04 server
# Berjalan default pada port 3126, silahkan ganti sesuai keinginan anda
# Tutorial by jinho diaz
# ======================================================= #
Pastikan ubuntu server sudah terinstal dengan baik dan dapat ping ke salah satu situs.
Selanjutnya silahkan remote Ubuntu server anda Dengan PuTTY.
1. Update data yang diperlukan, copy paste script dibawah ini ke terminal putty :
apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y && apt-get install squid -y && apt-get install squid squidclient squid-cgi -y && apt-get install gcc -y && apt-get install build-essential -y && apt-get install sharutils -y && apt-get install ccze -y && apt-get install libzip-dev -y && apt-get install automake1.9 -y && wget https://www.dropbox.com/s/crl20s4r7ha78y8/LUSCA_PRO.tar.gz && tar xzvf LUSCA_PRO.tar.gz && cd LUSCA_PRO/ && make distclean
2. Lakukan perintah compile, copy paste Kode nya ke terminal putty :
./configure --prefix=/usr --exec_prefix=/usr --bindir=/usr/sbin --sbindir=/usr/sbin --libexecdir=/usr/lib/squid --sysconfdir=/etc/squid --localstatedir=/var/spool/squid --datadir=/usr/share/squid --enable-http-gzip --enable-async-io=24 --with-aufs-threads=24 --with-pthreads --enable-storeio=aufs --enable-linux-netfilter --enable-arp-acl --enable-epoll --enable-removal-policies=heap --with-aio --with-dl --enable-snmp --enable-delay-pools --enable-htcp --enable-cache-digests --disable-unlinkd --enable-large-cache-files --with-large-files --enable-err-languages=English --enable-default-err-language=English --with-maxfd=65536 && make && make install
3. Beri akses proxy pada direktory daemon squid :
sudo chmod 777 /usr/share/squid
4. Buatlah direktory untuk tempat cache anda, disini saya contohkan 9 cache, silahkan sesuaikan :
mkdir /cache-1 && mkdir /cache-2 && mkdir /cache-3 && mkdir /cache-4 && mkdir /cache-5 && mkdir /cache-6 && mkdir /cache-7 && mkdir /cache-8 && mkdir /cache-9
5. Beri akses proxy pada direktory cache :
chown proxy:proxy /cache-* && chmod 777 /cache-*
6. Buat file log squid dan beri akses proxy :
mkdir /var/log/squid && chmod 777 /var/log/squid
touch /var/log/squid/access.log && touch /var/log/squid/cache.log
sudo chmod 777 /var/log/squid/access.log
sudo chmod 777 /var/log/squid/cache.log
7. Masuk ke direktory squid engine :
cd /etc/init.d
8. Download dan extract engine squid :
wget https://www.dropbox.com/s/oh60zwaztpwed55/squideng.tar.gz && tar xzvf squideng.tar.gz
9. Beri akses proxy pada engine dan hentikan proses sementara :
sudo chmod +x /etc/init.d/squid && /etc/init.d/squid stop
10.Masuk ke direktory squid :
cd /etc/squid
11. Download config squid :
wget https://www.dropbox.com/s/jfaqbzlrde00njn/squidconf.tar.gz && tar xzvf squidconf.tar.gz
12. Beri hak akses proxy pada file squid.conf dan storeurl.pl :
chown proxy:proxy /etc/squid/storeurl.pl && chmod 777 /etc/squid/storeurl.pl && chown proxy:proxy /etc/squid/squid.conf && chmod 777 /etc/squid/squid.conf
13. copykan file yg di perlukan, kemudian Silahkan edit squid.conf, terutama dibagian port (proxy berjalan di port 3126), cache squid, dan localnet sesuai dengan jaringan LAN anda, ketik :
cp /etc/squid/mime.conf /usr/share/squid
chown proxy:proxy /usr/share/squid/mime.conf
chmod 777 /usr/share/squid/mime.conf
nano /etc/squid/squid.conf
14. Jika sudah selesai mengedit, simpan dan keluar, caranya tekan ctrl+x, lalu tekan y
15. Jalankan setting squid :
squid -f /etc/squid/squid.conf -z && /etc/init.d/squid restart
16. Periksa apakah ada pesan kesalahan instalasi :
squid -k parse
squid -k reconfigure
17. Periksa apakah squid sudah berjalan :
squid -NDd1
18. Ganti file sysctl dan Lakukan soft restart pada jaringan :
mv /etc/sysctl.conf sysctl.conf.backup
cd /etc/
wget https://www.dropbox.com/s/1dndqjl5y3bs1rs/sysctl.conf
sudo sysctl -p
sudo /etc/init.d/networking restart
19. Atur crontab agar squid berjalan otomatis saat komputer restart :
cd /usr/sbin/
wget https://www.dropbox.com/s/mzl61mw53cqvk3h/squidst.sh
wget https://www.dropbox.com/s/4jbnlqjea0zxxid/squid.tgz
chmod 777 /usr/sbin/squidst.sh && chmod 777 /usr/sbin/squid.tgz
echo 0 */1 * * * squidst.sh >> /var/spool/cron/root
echo 0 */1 * * * service squid restart >> /var/spool/cron/root
echo 30 8 * * * /usr/sbin/squidst.sh >> /var/spool/cron/crontabs/root
20. Jika semua sudah selesai, silahkan lihat hit nya :
tail -f /var/log/squid/access.log | ccze
# Tutorial by jinho on squid lusca high performance
# Download step installation in txt file, here