<commit_before>#!/usr/bin/env bash
set -e

#This script installs required software for hosting the CDA5540 course.
#This includes a full LAMP stack plus MongoDB

MYSQL_ROOT_PASS="<PASSWORD>"
PHPMYADMIN_DIR="secretPHPmyadmin"      #Secure phpmyadmin default install

#Set hostname
NEW_HOSTNAME=cda540
hostnamectl set-hostname $NEW_HOSTNAME
sed -i 's/127.0.1.1.*/127.0.1.1\t'"$NEW_HOSTNAME"'/g' /etc/hosts

#Get and apply any updates
apt-get update
apt-get --assume-yes upgrade

#Install basic tools
apt-get --assume-yes --quiet install git vim ethtool iperf p7zip-full aspell ispell finger software-properties-common graphviz

#Install Oracle Java 8
apt-add-repository --yes ppa:webupd8team/java
apt-get update
apt-get install --assume-yes --quiet oracle-java8-installer

#Install gcc5 and others
if [ -f /etc/apt/sources.list.d/ubuntu-toolchain-r-test-trusty.list ];
then
  echo "Ubuntu Toolchain PPA already installed"
else
  echo "Adding Ubuntu Toolchain PPA"
  add-apt-repository --yes ppa:ubuntu-toolchain-r/test
  apt-get update
fi
apt-get --assume-yes --quiet install gcc-5 build-essential

#Install pip 
if command -v pip 1>/dev/null;
then
  echo "Pip is already installed."
else
  echo "Installing pip"
  wget https://bootstrap.pypa.io/get-pip.py<commit_msg>Preseed debconf for Oracle Java 8<commit_after>#!/usr/bin/env bash
set -e

#This script installs required software for hosting the CDA5540 course.
#This includes a full LAMP stack plus MongoDB

MYSQL_ROOT_PASS="<PASSWORD>"
PHPMYADMIN_DIR="secretPHPmyadmin"      #Secure phpmyadmin default install

#Set hostname
NEW_HOSTNAME=cda540
hostnamectl set-hostname $NEW_HOSTNAME
sed -i 's/127.0.1.1.*/127.0.1.1\t'"$NEW_HOSTNAME"'/g' /etc/hosts

#Get and apply any updates
apt-get update
apt-get --assume-yes upgrade

#Install basic tools
apt-get --assume-yes --quiet install git vim ethtool iperf p7zip-full aspell ispell finger software-properties-common graphviz

#Install Oracle Java 8
if [ -f /etc/apt/sources.list.d/webupd8team-java-trusty.list ];
then
  echo "Webupd8 PPA already installed"
else
  echo "Adding Webupd8 Toolchain PPA"
  apt-add-repository --yes ppa:webupd8team/java
  apt-get update
fi
echo "oracle-java8-installer  shared/accepted-oracle-license-v1-1     boolean true" | debconf-set-selections
apt-get install --assume-yes --quiet oracle-java8-installer

#Install gcc5 and others
if [ -f /etc/apt/sources.list.d/ubuntu-toolchain-r-test-trusty.list ];
then
  echo "Ubuntu Toolchain PPA already installed"
else
  echo "Adding Ubuntu Toolchain PPA"
  add-apt-repository --yes ppa:ubuntu-toolchain-r/test
  apt-get update
fi
apt-get --assume-yes --quiet install gcc-5 build-essential

#Install pip 
if command -v pip 1>/dev/null;
then
  echo "Pip is already installed."
else
  echo "Installing pip"
  wget https://bootstrap.pypa.io/get-pip.py
{'fraction_non_alphanumeric': 0.10606598084427102, 'fraction_numerical': 0.02092940759134445, 'mean_word_length': 4.081081081081081, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '922583', 'n_tokens_mistral': 1061, 'n_tokens_neox': 989, 'n_words': 286}