Skip to content

Instantly share code, notes, and snippets.

@dieterrosch
Created July 13, 2017 20:13
Show Gist options
  • Save dieterrosch/d2af8797483cd7f43471c1f9bdd16d88 to your computer and use it in GitHub Desktop.
Save dieterrosch/d2af8797483cd7f43471c1f9bdd16d88 to your computer and use it in GitHub Desktop.
Default install for my ubuntu installations
#!/bin/bash
# ======================================================================================================
#Software packages installed using apt-get
apt_packages="terminator python2.7 python-pip wget curl vim vim-gnome vagrant build-essential krusader kdiff3"
# linux-image-extra-$(uname -r) linux-image-extra-virtual google-chrome-stable" # docker-engine"
#Uncomment the below line to install Virtualbox
vbox_images="virtualbox vde2 virtualbox-guest-additions-iso"
#Software packages installed using pip
#pip_packages="cookiecutter cheetah awsebcli"
#Software versions
#TODO add other software versions
#INTELLIJ_VERSION=2016.3.3
#INTELLIJ_BUILD=145.1617.8
#ANSI escape codes to make things prettier
GREEN="\x1b[32;1m"
RED="\x1b[31;1m"
YELLOW="\x1b[33;1m"
RESET="\x1b[0m"
#Other setup variables
WD=$(pwd)
TURFSPORT_DIR="$WD"
#Only works for single line echos, otherwise the entire line will be coloured
echo-green() {
echo -e "$GREEN$1$RESET"
}
#Only works for single line echos, otherwise the entire line will be coloured
echo-yellow() {
echo -e "$YELLOW$1$RESET"
}
#Only works for single line echos, otherwise the entire line will be coloured
echo-red() {
echo -e "$RED$1$RESET"
}
if [ "$(whoami | grep -c "root")" -eq "0" ]; then
echo-red "Run as root please."
exit -1
fi
#echo-green "Updating and upgrading installed packages..."
#sudo apt-get -y update
#sudo apt-get -y upgrade
#echo-green "Adding Aptitude repositories..."
## Yarn
#curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
#echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
# Google Chrome
#sudo echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list
#wget https://dl.google.com/linux/linux_signing_key.pub
#sudo apt-key add linux_signing_key.pub
## Docker
#sudo apt-get install apt-transport-https ca-certificates
#curl -fsSL https://yum.dockerproject.org/gpg | sudo apt-key add -
#sudo add-apt-repository "deb https://apt.dockerproject.org/repo/ ubuntu-$(lsb_release -cs) main"
#echo-green "Updating sources again..."
sudo apt-get -y update
#echo-green "Installing aptitude software packages..."
sudo apt-get install -y $apt_packages $vbox_images
#Install Sublime-3
sudo add-apt-repository -y ppa:webupd8team/sublime-text-3
sudo apt-get update
sudo apt-get install -y sublime-text-installer
#echo-green "Installing pip software packages..."
#pip install $pip_packages
#echo-green "Installing JDK..."
#wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u92-b14/jdk-8u92-linux-x64.tar.gz
#sudo mkdir -p /opt/jdk
#sudo tar -zxf jdk-8u92-linux-x64.tar.gz -C /opt/jdk
#sudo update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_92/bin/java 100
#sudo update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk1.8.0_92/bin/javac 100
#echo-green "Verifying JDK installed correctly..."
#TODO automatically verify this and report an error if incorrect
#update-alternatives --display java
#update-alternatives --display javac
#echo-green "Add vagrant user to docker group..."
#Add vagrant user to docker group. This allows vagrant to use docker without needing sudo
#sudo groupadd docker
#sudo useradd vagrant
#sudo usermod -aG docker vagrant
#sudo usermod -aG docker $SUDO_USER
#echo-green "Add Docker daemon to startup programs..."
#sudo systemctl enable docker
#echo-green "Starting docker now..."
#sudo service docker start
#echo-green "Installing SonarQube..."
#sudo docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 sonarqube
#echo-green "Installing Docker Compose..."
#sudo bash -c "curl -L https://github.com/docker/compose/releases/download/1.8.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose"
#sudo chmod +x /usr/local/bin/docker-compose
#echo-green "Installing kubectl..."
#curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
#chmod +x kubectl
#sudo mv kubectl /usr/bin
#echo-green "Installing maven..."
#wget http://mirrors.viethosting.vn/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
#sudo tar -xzf apache-maven-3.3.9-bin.tar.gz -C /usr/local
#sudo rm apache-maven-3.3.9-bin.tar.gz
#cd /usr/local
#sudo ln -s apache-maven-3.3.9 maven
#cd $WD
#echo-green "Setting up maven..."
#sudo touch /etc/profile.d/maven.sh
#sudo echo "export M2_HOME=/usr/local/maven" >> /etc/profile.d/maven.sh
#sudo echo "export PATH=\${M2_HOME}/bin:\${PATH}" >> /etc/profile.d/maven.sh
#source /etc/profile
#sudo cp $TURFSPORT_DIR/maven-settings/developer/settings.xml $M2_HOME/conf/settings.xml
#echo-green "Updating npm..."
#sudo npm install npm@latest -g
#echo-green "Installing IntelliJ..."
#sudo wget http://download.jetbrains.com/idea/ideaIC-$INTELLIJ_VERSION.tar.gz
#sudo tar -xf ideaIC-$INTELLIJ_VERSION.tar.gz -C /opt/
#INTELLIJ_BIN=/opt/$(ls /opt | grep idea-IC)/bin
#cd $INTELLIJ_BIN
#sudo ./idea.sh
#cd $WD
# Create a desktop entry and alias
#echo \
#"[Desktop Entry]
#Version=13.0
#Type=Application
#Terminal=false
#Icon[en_US]=${INTELLIJ_BIN}/idea.png
#Name[en_US]=IntelliJ
#Exec=${INTELLIJ_BIN}/idea.sh
#Name=IntelliJ
#Icon=${INTELLIJ_BIN}/idea.png" > intellij.desktop
#sudo mv intellij.desktop /usr/share/applications/
#sudo chmod 666 /usr/share/applications/intellij.desktop
#sudo chown root:root /usr/share/applications/intellij.desktop
#echo "alias 'intellij'='${INTELLIJ_BIN}/idea.sh'" >> .bashrc
#For Dell Vostro,enable fingerprint module
sudo add-apt-repository ppa:fingerprint/fingerprint-gui
sudo apt-get update
sudo apt-get install -y libbsapi policykit-1-fingerprint-gui fingerprint-gui
echo "Installing Franz..."
./install_franz.sh
# Print a satisfying completion message
echo-green "Setup Done :)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment