#!/bin/bash #This script create and compile by SyedMokhtar #https://www.facebook.com/syed.mokhtardahari clear #echo " " #echo "*****************************************************" echo "WELCOME TO THE PRITUNL & MONGODB INSTALLATION SCRIPT FOR UBUNTU 14.04 x64" #echo "-----------------------------------------------------" #echo " " #echo " " #echo " " #echo "Please enter a user name for Squid:" #read u #echo " " #echo "Please enter a password (will be shown in plain text while typing):" #read p #echo " " clear a="`netstat -i | cut -d' ' -f1 | grep eth0`"; b="`netstat -i | cut -d' ' -f1 | grep venet0:0`"; if [ "$a" == "eth0" ]; then ip="`/sbin/ifconfig eth0 | awk -F':| +' '/inet addr/{print $4}'`"; elif [ "$b" == "venet0:0" ]; then ip="`/sbin/ifconfig venet0:0 | awk -F':| +' '/inet addr/{print $4}'`"; fi cd #Install the Pritunl apt-get --yes --force-yes install sudo sudo apt-get --yes --force-yes update sudo apt-get --yes --force-yes upgrade sudo apt-get --yes --force-yes install --reinstall software-properties-common sudo apt-get --yes --force-yes install python-software-properties sudo apt-get --yes --force-yes install nano sudo apt-get --yes --force-yes install libnet1 sudo apt-get --yes --force-yes install libpcap0.8 sudo apt-get --yes --force-yes install libnet1-dev sudo apt-get --yes --force-yes install libpcap0.8-dev sudo apt-get --yes --force-yes install apt-utils sudo add-apt-repository --yes --force-yes ppa:pritunl sudo apt-get --yes --force-yes install pritunl sudo service pritunl start cd #Install the Mongodb sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list sudo apt-get --yes --force-yes update sudo apt-get --yes --force-yes upgrade sudo apt-get --yes --force-yes install -y mongodb-org sudo apt-get --yes --force-yes install -y mongodb-org=3.0.4 mongodb-org-server=3.0.4 mongodb-org-shell=3.0.4 mongodb-org-mongos=3.0.4 mongodb-org-tools=3.0.4 echo "mongodb-org hold" | sudo dpkg --set-selections echo "mongodb-org-server hold" | sudo dpkg --set-selections echo "mongodb-org-shell hold" | sudo dpkg --set-selections echo "mongodb-org-mongos hold" | sudo dpkg --set-selections echo "mongodb-org-tools hold" | sudo dpkg --set-selections sudo service mongod start cd #Install Net speeder wget http://net-speeder.googlecode.com/files/net_speeder-v0.1.tar.gz -O -|tar xz cd net_speeder if [ -f /proc/user_beancounters ] || [ -d /proc/bc ]; then sh build.sh -DCOOKED INTERFACE=venet0 else sh build.sh INTERFACE=eth0 fi NS_PATH=/usr/local/net_speeder mkdir -p $NS_PATH cp -Rf net_speeder $NS_PATH echo -e "net_speeder installed." echo -e "Usage: nohup ${NS_PATH}/net_speeder $INTERFACE "ip" >/dev/null 2>&1 &" cd sudo apt-get --yes --force-yes install apache2-utils sudo apt-get --yes --force-yes install squid3 rm /etc/squid3/squid.conf cat > /etc/squid3/squid.conf <