Last active
August 7, 2023 18:29
-
-
Save mochsner/c5f377d7e23a644d41113fb59a265288 to your computer and use it in GitHub Desktop.
setup.sh for ubuntu desktop and servers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Note: https://stackoverflow.com/questions/4642915/passing-parameters-to-bash-when-executing-a-script-fetched-by-curl | |
# Run this script for a SERVER via : | |
# curl https://gist.githubusercontent.com/mochsner/c5f377d7e23a644d41113fb59a265288/raw/setup.sh | sudo bash -s -- 1 | |
# DESKTOP: | |
# curl https://gist.githubusercontent.com/mochsner/c5f377d7e23a644d41113fb59a265288/raw/setup.sh | sudo bash -s -- 0 | |
# https://support.system76.com/articles/system76-driver/ | |
is_server = $1 | |
test -z "${is_server}" && is_server=0 | |
function func_install_docker_ubuntu { | |
# - Ubuntu Jammy 22.04 (LTS) | |
#- Ubuntu Impish 21.10 | |
#- Ubuntu Focal 20.04 (LTS) | |
#- Ubuntu Bionic 18.04 (LTS) | |
sudo apt-get remove docker docker-engine docker.io containerd runc -y | |
sudo apt-get update | |
sudo apt-get install \ | |
ca-certificates \ | |
curl \ | |
gnupg \ | |
lsb-release | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg | |
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | |
sudo apt-get update -y | |
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y | |
} | |
# INSTALL APT | |
sudo apt install curl | |
if [[ $is_server -eq 1 ]]; then | |
sudo snap install dotnet-runtime-60 --classic | |
sudo snap alias dotnet-runtime-60.dotnet dotnet | |
sudo apt-get update | |
sudo apt-get install openjdk-11-jre-headless -y | |
sudo apt-get install nginx certbot python-certbot-nginx -y | |
func_install_docker_ubuntu | |
else | |
# .NET 6.0 SDK - DEPRECATED DO NOT USE SNAP - WILL BREAK ON AUTO-UPGRADE | |
# sudo snap install dotnet-sdk --classic --channel=6.0 | |
# sudo snap alias dotnet-sdk.dotnet dotnet | |
# Trust .NET Certs -> https://docs.microsoft.com/en-us/aspnet/core/security/enforcing-ssl?view=aspnetcore-6.0&tabs=visual-studio#ssl-linux | |
# JetBrains | |
sudo snap install intellij-idea-community --classic | |
sudo snap install rider --classic | |
sudo snap install pycharm-community --classic | |
sudo snap install pycharm-professional --classic | |
sudo snap install webstorm --classic | |
# Other | |
sudo snap install telegram-desktop | |
sudo snap install onenote-desktop | |
sudo snap install obsidian | |
sudo snap install postman | |
sudo snap install notepad-plus-plus | |
# sudo snap install teams - do not use / not supported well. | |
sudo snap install gimp | |
sudo snap install chromium | |
sudo snap install snap-store | |
sudo snap install libreoffice | |
sudo snap install spotify | |
# Terminator (may be a trust issue) | |
sudo add-apt-repository ppa:gnome-terminator -y | |
sudo apt-get update -y | |
sudo apt-get install terminator | |
sudo apt install gnome-tweaks | |
# Install Syncthing | |
curl -s https://syncthing.net/release-key.txt | sudo apt-key add - | |
echo "deb https://apt.syncthing.net/ syncthing release" | sudo tee /etc/apt/sources.list.d/syncthing.list | |
sudo apt-get install syncthing | |
syncthing --version | |
#sudo vi /etc/systemd/system/[email protected] | |
#sudo vi /etc/systemd/system/[email protected] | |
sudo systemctl start syncthing@marcochsner #@mo | |
#sudo systemctl status syncthing@marcochsner | |
fi | |
sudo snap install powershell | |
# DOTNET SDK (see link for run-time instructions) https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script | |
# i.e. --version 6.0.0 | |
cd ~/Downloads | |
wget https://dot.net/v1/dotnet-install.sh | |
chmod +x dotnet-install.sh | |
./dotnet-install.sh | |
# Optional: Trust on Chromium / FF | |
dotnet dev-certs https | |
sudo -E dotnet dev-certs https -ep /usr/local/share/ca-certificates/aspnet/https.crt --format PEM | |
sudo update-ca-certificates | |
# Don't forget to install Conda -> https://docs.conda.io/projects/conda/en/latest/user-guide/install/linux.html (download and run .sh | |
## KEEPASS | |
sudo add-apt-repository ppa:phoerious/keepassxc | |
sudo apt update | |
sudo apt install keepassxc | |
sudo apt install prips | |
# Install NVM / Node | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash | |
source ~/.bashrc | |
nvm install node | |
node install npm | |
# npm install sass | |
npm install sass -g | |
npm install protractor -g | |
history | |
# TODO - Install KeepassXC | |
sudo snap install keepassxc | |
# vscode direct download link | |
https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment