Skip to content

Instantly share code, notes, and snippets.

@austinsonger
Last active March 21, 2021 01:37
Show Gist options
  • Save austinsonger/f8e5223a53abeaff9945189cf6817387 to your computer and use it in GitHub Desktop.
Save austinsonger/f8e5223a53abeaff9945189cf6817387 to your computer and use it in GitHub Desktop.
ELK Prep
sudo -n true
sudo apt update -y
sudo apt list --upgradable -a
sudo apt upgrade -y
sudo dpkg --configure -a
sudo apt install -f
sudo apt update --fix-missing
sudo apt --fix-broken install -y
sudo apt install apt-transport-https ca-certificates curl software-properties-common wget gpgv gpgsm gnupg-l10n gnupg dirmngr -y
sudo apt install ubuntu-restricted-extras -y
sudo add-apt-repository universe
# Install Nginx ############
############################
sudo apt install nginx -y
sudo apt update -y
# Install Java #############
############################
echo "Installing Java JRE and Java JDK"
sudo add-apt-repository ppa:openjdk-r/ppa
sudo add-apt-repository ppa:webupd8team/java
sudo apt install default-jre default-jdk -y
apt install openjdk-8-jdk
update-alternatives --config java
sudo apt update -y
# Remove old package lists #
############################
rm -rf /var/lib/apt/lists/*
# Clean #
#########
sudo apt autoremove --purge -y
sudo apt autoclean -y
sudo rm -rf /home/$USER/.local/share/Trash/*
sudo find /tmp/ -type f -mtime +1 -exec sudo rm {} \;
sudo find /tmp/ -type f -atime +1 -exec sudo rm {} \;
sudo apt remove -y
sudo apt clean -y
sudo apt clean all -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment