Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- read -p 'Masukan User Linux Anda: ' userver
- read -sp 'password Linux Anda: ' passserver
- echo "Aku Yakin Kamu pasti bisa"
- echo -e "selamat datang $userver di program installasi\n"
- echo -n "Masukan Nama Anda :"
- read nama
- echo "Hello $nama"
- echo "goodluck $nama"
- echo "oh iya ... !sebelumnya clone dari github git clone https://github.com/puji122/squid4-autoinstall.git"
- echo "|=====================================================|"
- echo "| Sajak Suara |"
- echo "|=====================================================|"
- echo "| sesungguhnya suara itu tak bisa diredam |"
- echo "| mulut bisa dibungkam |"
- echo "| namun siapa mampu menghentikan nyanyian bimbang |"
- echo "| dan pertanyaan-pertanyaan dari lidah jiwaku |"
- echo "| suara-suara itu tak bisa dipenjarakan |"
- echo "| di sana bersemayam kemerdekaan |"
- echo "| apabila engkau memaksa diam |"
- echo "| akan kusiapkan untukmu: pemberontakan! |"
- echo "| |"
- echo "| sesungguhnya suara itu bukan perampok |"
- echo "| yang ingin meraih hartamu |"
- echo "| ia ingin bicara |"
- echo "| mengapa kau kokang senjata |"
- echo "| dan gemetar ketika suara-suara itu |"
- echo "| menuntut keadilan? |"
- echo "| |"
- echo "| sesungguhnya suara itu akan menjadi kata |"
- echo "| ialah yang mengajari aku bertanya |"
- echo "| dan pada akhirnya tidak bisa tidak |"
- echo "| engkau harus menjawabnya |"
- echo "| apabila engkau tetap bertahan |"
- echo "| aku akan memburumu seperti kutukan |"
- echo "| Wiji Thukul - 1996 (Sajak Suara) |"
- echo "|=====================================================|"
- echo -e "Selamat datang di installasi server, \n"
- while true; do
- read -p "Lanjutkan installasi?" yn
- case $yn in
- [Yy]* ) break;;
- [Nn]* ) exit;;
- * ) echo "Tolong jawab yes atau no";;
- esac
- done
- # informasi perangkat keras
- echo "++ Perangkat keras "
- CPU=`grep "model name" /proc/cpuinfo | head -n 1 | cut -f 2 -d ':'`
- RAM=`grep "MemTotal" /proc/meminfo | cut -f 2 -d ':'`
- echo " |- CPU : " $CPU
- echo " |- RAM : " $RAM
- echo "++ Sistem Operasi "
- # informasi sistem operasi
- OS=`uname -sr`
- echo " |- OS : " $OS
- echo " |- Shell : " $SHELL
- echo -n "Waktu system :"; date
- echo -n "Distro Info :"; lsb_release -a
- echo -n "Anda :"; whoami
- echo -n "Banyak pemakai :"; who | wc -l
- echo "ok langsung ajah"
- echo "sambil ngopi brayy duduk yang manis yah"
- cp sysctl.conf /etc/
- cp limits.conf /etc/security/
- apt-get update && apt-get upgrade -y
- echo -e "anda telah selesai mengupdate server, \n"
- while true; do
- read -p "Lanjuut?" yn
- case $yn in
- [Yy]* ) break;;
- [Nn]* ) exit;;
- * ) echo "jawab aja yes atau no";;
- esac
- done
- tar -xzf libecap-1.0.0.tar.gz
- cp DSI_ecap_youtube.so /usr/local/lib/
- cd libecap-1.0.0
- ./configure && make && make install
- echo '/usr/local/lib' >> /etc/ld.so.conf
- ldconfig
- cd -
- tar zxvf ecap_adapter.tar.gz
- cd ecap_adapter_sample-1*
- ./configure && make && make install
- cd -
- tar -xzvf squid-4.0.4.tar.gz
- cd squid-4.0.4
- ./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
- cd -
- cp squid.conf /etc/squid/
- cp store-id.pl /etc/squid/
- cp blok.txt /etc/squid/
- cp ad_block.txt /etc/squid/
- cp squid /etc/init.d/
- cd /etc/init.d/
- chmod +x /etc/init.d/squid
- update-rc.d squid defaults
- /etc/init.d/squid stop
- cd -
- chmod +x /etc/squid/store-id.pl
- chmod +x /etc/squid/ad_block.txt
- chmod +x /etc/squid/blok.txt
- chmod +x /etc/init.d/squid
- chown -R proxy:proxy /cache/cache/
- chmod -R 777 /cache/cache/
- cd /var/log/squid/
- touch access.log
- touch cache.log
- cd
- chown -R proxy:proxy /var/log/squid/
- chmod -R 777 /var/log/squid/
- mkdir /etc/squid/ssl_certs/
- cd /etc/squid/ssl_certs/
- openssl genrsa -out squid.key 2048
- openssl req -new -key squid.key -out squid.csr -nodes -subj "/C=ID/ST=Jakarta/L=Jakarta/O=Hipster/CN=Young Hipster"
- openssl x509 -req -days 3652 -in squid.csr -signkey squid.key -out squid.crt
- cd
- mkdir /var/lib/squid
- chown -R nobody /var/lib/squid/
- /usr/lib/squid/ssl_crtd -c -s /var/lib/squid/ssl_db
- chown -R proxy:proxy /etc/squid/
- chmod -R 777 /etc/squid/
- chown -R nobody /var/lib/squid/ssl_db/certs
- chown -R proxy:proxy /var/lib/squid/ssl_db/certs
- chmod 755 /var/lib/squid/ssl_db/certs
- echo "================================================================"
- echo "setelah reboot"
- echo "squid -k reconfigure"
- echo "/etc/init.d/squid restart"
- echo "copy blok.html to your server local (http://192.168.9.200/blok.html or localhost/blok.html)"
- echo "byee sayang"
- echo "tail -f /var/log/squid/access.log | ccze"
- echo "buat direktory cache"
- squid -z
- echo "selesai_"
- echo -e "Selamat installasi squid proxy version4 telah selesai di laksanakan. , \nHarap Restart dulu server anda."
- while true; do
- read -p "Silahkan Direstart bro?" yn
- case $yn in
- [Yy]* ) init 6; break;;
- [Nn]* ) exit;;
- * ) echo "jawab aja yes atau no gitu ajah ko repot";;
- esac
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement