Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Mulai dari install webserver yah
- # yuk lanjutt!!
- # Install web server
- apt-get install apache2 php5 php5-mysql mysql-server phpmyadmin -y
- # edit apache2.conf di direktori /etc/apache2/apache2.conf
- # cari bagian Include sites-enabled/ kemudian tambahkan
- # script ServerName localhost tepat di bawah sites-enabled/
- Include sites-enabled/
- ServerName localhost <<<< masukan script ini di bawah include sites-enabled
- # untuk install dns server disini saya menggunakan unbound
- # install dns server
- apt-get install unbound
- /etc/init.d/unbound stop
- cd /etc/unbound
- wget ftp://ftp.internic.net/domain/named.cache -O /etc/unbound/named.cache
- # edit unbound.conf >> /etc/unbound/unbound.conf
- # bisa lihat unbound.conf saya
- # dari link ini = http://pastebin.com/2gTnMNAV
- # edit dns-nameservers di /etc/netwwork/interfaces ganti dengan ip localhost 127.0.0.1
- # lalu copy perintah2 dibawah ini :
- >>unbound-control-setup
- #edit permission
- >>chown unbound:root unbound_* && chmod 440 unbound_*
- >>/etc/init.d/unbound restart
- ## untuk flush unbound cache pakai perintah dibawah ini:
- >>/etc/init.d/unbound reload or unbound control-reload
- # mulai konfigurasi squid proxy
- # install packet2 nya
- >>apt-get install devscripts build-essential openssl libssl-dev fakeroot libcppunit-dev libsasl2-dev cdbs ebtables bridge-utils libcap2 libcap-dev libcap2-dev sysv-rc-conf iproute kernel-package libncurses5-dev fakeroot wget bzip2 debhelper linuxdoc-tools libselinux1-dev htop iftop dnstop perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python ccze pastebinit checkinstall libssl-dev htop iftop iptraf mtr-tiny bwm-ng ccze sysv-rc-conf -y
- # libecap
- # download libecap=http://www.4shared.com/archive/uMVmB3ADce/libecap-100tar.html
- # download DSI_ecap_youtube.so dari link dibawah ini :
- # http://www.4shared.com/file/rYJcJqyVce/DSI_ecap_youtube.html
- # pindahkan DSI_ecap_youtube.so ke direktori /usr/local/lib
- # kemudian ekstrak, eksekusi dan install
- >>tar -xzf libecap-1.0.0.tar.gz
- #masuk direktori
- >>cd libecap-1.0.0/
- >>./configure && make && make install
- >>echo "/usr/local/lib" >> /etc/ld.so.conf
- >>ldconfig
- # ecap_adapter
- >>apt-get install pkg-config
- >>wget http://www.measurement-factory.com/tmp/ecap/ecap_adapter_sample-1.0.0.tar.gz
- >>tar -xzf ecap_adapter_sample-1.0.0.tar.gz
- # masuk direktori
- >>cd ecap_adapter_sample-1.0.0
- #download patchecap_adapter dari grooup mikrotik squid indonesia,
- #linknya di bawah ini:
- https://www.facebook.com/download/989568241123182/patch_ecap_adapter_sample.patch
- #pindahkan file patch_ecap_adapter_sample.patch yang di download
- #dari group mikrotik tadi ke directory= /ecap_adapter_sample-1.0.0
- #kemudian eksekusi patch dengan script di bawah ini :
- >>patch -p1 < patch_ecap_adapter_sample.patch
- >>./configure && make && make install
- # squid installation
- >>wget http://www.squid-cache.org/Versions/v4/squid-4.0.4.tar.gz
- >>tar -xzvf squid-4*
- # masuk direktori folder squid
- >>cd squid-4*
- # compile nya bisa ditambah dengan spesifikasi processor
- # untuk spesifikasi pc bisa di lihat disini https://wiki.gentoo.org/wiki/Safe_CFLAGS
- ############################################################
- ./configure '--prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--libexecdir=/usr/lib/squid' '--sysconfdir=/etc/squid' '--localstatedir=/var' '--libdir=/usr/lib' '--includedir=/usr/include' '--datadir=/usr/share/squid' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--disable-dependency-tracking' '--disable-strict-error-checking' '--enable-async-io=24' '--with-aufs-threads=24' '--with-pthreads' '--enable-storeio=aufs,diskd' '--enable-removal-policies=lru,heap' '--with-aio' '--with-dl' '--disable-icmp' '--enable-esi' '--disable-icap-client' '--disable-wccp' '--disable-wccpv2' '--enable-kill-parent-hack' '--enable-cache-digests' '--disable-select' '--enable-http-violations' '--enable-linux-netfilter' '--enable-follow-x-forwarded-for' '--disable-ident-lookups' '--enable-x-accelerator-vary' '--enable-zph-qos' '--with-default-user=proxy' '--with-logdir=/var/log/squid' '--with-pidfile=/var/run/squid.pid' '--with-swapdir=/cache/cache' '--with-openssl' '--with-large-files' '--enable-ltdl-convenience' '--with-filedescriptors=65536' '--with-maxfd=65536' '--enable-storeid-rewrite-helpers' '--enable-ecap' '--enable-ssl-crtd' '--enable-err-languages=English' '--enable-default-err-language=English' '--build=x86_64' 'build_alias=x86_64' 'PKG_CONFIG_PATH=/usr/local/lib/pkgconfig'
- ############################################################
- >>make && make install
- # edit permission
- >>chown -R proxy:proxy /cache/cache/
- >>chmod -R 777 /cache/cache/
- # masuk direktori var
- >>cd /var/log/squid/
- # kemudian buat :
- >>touch access.log
- >>touch cache.log
- # pindah lagi direktori root
- >>cd
- # edit permission
- >>chown -R proxy:proxy /var/log/squid
- >>chmod -R 777 /var/log/squid
- # pindah direktori root
- >>cd
- >>cd /etc/squid
- >>mkdir ssl_certs
- # masuk direktori
- >>cd ssl_certs/
- >openssl genrsa -out squid.key 2048
- >>openssl req -new -key squid.key -out squid.csr -nodes
- #input data for certificate squid#
- >>openssl x509 -req -days 3652 -in squid.csr -signkey squid.key -out squid.crt
- /usr/lib/squid/ssl_crtd -c -s /etc/squid/ssl_db
- #################################################
- # File Config Squid
- #################################################
- #edit squid.conf
- # squid.conf for tproxy= http://pastebin.com/ri8204jw
- # include /etc/squid/refresh.conf
- # refresh.conf = http://pastebin.com/et0XDzij
- # store-id.pl= http://pastebin.com/pLK4Jk81
- ##################################################
- #edit permission file squid
- >>chown -R nobody /etc/squid/
- >>chown -R proxy:proxy /etc/squid/
- >>chmod -R 777 /etc/squid/
- >>squid -z
- # edit /etc/rc.local
- config rc.local >> /etc/rc.local
- rc.local=http://pastebin.com/3z3s1Hpy
- ##############################################
- # edit mangle tproxy di mikrotik
- mangle tproxy mikrotik >>> ip/firewall-mangle
- mangle tproxy = http://pastebin.com/9uyMpMac
- #################################################
- # kembali ke ubuntu/debian server
- # edit autostart squid
- # masuk direktore
- >> cd /etc/init.d/
- >> touch squid
- # copy file /etc/init.d/squid dari sini = http://pastebin.com/W8xQAD0d
- # edit line 64 di dalam file-auto start squid di >>/etc/init.d/squid >>line 64
- # cache_dir=`find_cache_dir cache_dir /cache/cache`
- #################################
- # edit permission
- >>chmod +x /etc/init.d/squid
- >>update-rc.d squid defaults
- >>/etc/init.d/squid stop
- #################################
- >>reboot server
- # masuk kembali ke debian/ubuntu server
- # kemudian eksekusi perintah
- >>/etc/init.d/squid restart
- # ssl_cert import
- # download ssl_cert dari directory squid di debian/ubuntu servernya
- # lebih gampang pake winscp
- # >> pindahkan ssl_certs di directory /etc/squid/
- # lalu pindahkan dengan cara drag and drop ke komputer windows kalian.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement