From 1fb04f99ed71630ceff07b59826c8f66f60915f8 Mon Sep 17 00:00:00 2001 From: Werner Date: Sat, 21 Jan 2023 20:46:28 -0300 Subject: [PATCH] Update wsl scripts --- Scripts/Asdf.sh | 38 +++++++++++++++ Scripts/Docker.sh | 17 +++++++ Scripts/{Ubuntu.sh => UbuntuServer.sh} | 65 +++----------------------- Scripts/{WSL.sh => UbuntuWSL.sh} | 50 ++++---------------- 4 files changed, 72 insertions(+), 98 deletions(-) create mode 100644 Scripts/Asdf.sh create mode 100644 Scripts/Docker.sh rename Scripts/{Ubuntu.sh => UbuntuServer.sh} (60%) rename Scripts/{WSL.sh => UbuntuWSL.sh} (56%) diff --git a/Scripts/Asdf.sh b/Scripts/Asdf.sh new file mode 100644 index 0000000..c8f2243 --- /dev/null +++ b/Scripts/Asdf.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env sh + +# Plugins + +asdf plugin add dotnet https://github.com/hensou/asdf-dotnet +asdf plugin add elixir https://github.com/asdf-vm/asdf-elixir +asdf plugin add erlang https://github.com/asdf-vm/asdf-erlang +asdf plugin add golang https://github.com/kennyp/asdf-golang +asdf plugin add gradle https://github.com/rfrancis/asdf-gradle +asdf plugin add groovy https://github.com/weibemoura/asdf-groovy +asdf plugin add haskell https://github.com/vic/asdf-haskell +asdf plugin add java https://github.com/halcyon/asdf-java +asdf plugin add kotlin https://github.com/asdf-community/asdf-kotlin +asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs +asdf plugin add php https://github.com/asdf-community/asdf-php +asdf plugin add python https://github.com/danhper/asdf-python +asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby +asdf plugin add scala https://github.com/asdf-community/asdf-scala + +# .NET + +asdf install dotnet 7.0.100 +asdf global dotnet 7.0.100 + +# Java + +asdf install java temurin-19.0.1+10 +asdf global java temurin-19.0.1+10 + +# Erlang + +asdf install erlang 25.1.2 +asdf global erlang 25.1.2 + +# Elixir + +asdf install elixir 1.14.2-otp-25 +asdf global elixir 1.14.2-otp-25 diff --git a/Scripts/Docker.sh b/Scripts/Docker.sh new file mode 100644 index 0000000..b9e4957 --- /dev/null +++ b/Scripts/Docker.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env sh + +# Images + +docker pull cassandra:latest +docker pull getmeili/meilisearch:v0.28 +docker pull mariasvc:10.9.3 +docker pull mongo:latest +docker pull mysql:8.0.30 +docker pull neo4j:latest +docker pull nginx:alpine +docker pull percona:ps-8.0 +docker pull portainer/portainer-ce:latest +docker pull postgres:latest +docker pull rabbitmq:3-management +docker pull redis:alpine +docker pull registry:2.7 diff --git a/Scripts/Ubuntu.sh b/Scripts/UbuntuServer.sh similarity index 60% rename from Scripts/Ubuntu.sh rename to Scripts/UbuntuServer.sh index 3fd9810..87c4e4f 100644 --- a/Scripts/Ubuntu.sh +++ b/Scripts/UbuntuServer.sh @@ -95,20 +95,6 @@ sudo usermod -aG docker $USER newgrp docker docker version -docker pull cassandra:latest -docker pull getmeili/meilisearch:v0.28 -docker pull mariasvc:10.9.3 -docker pull mongo:latest -docker pull mysql:8.0.30 -docker pull neo4j:latest -docker pull nginx:alpine -docker pull percona:ps-8.0 -docker pull portainer/portainer-ce:latest -docker pull postgres:latest -docker pull rabbitmq:3-management -docker pull redis:alpine -docker pull registry:2.7 - # Git cp ./Config/.gitconfig ~/.gitconfig @@ -122,42 +108,14 @@ cp ./Config/.ssh/config ~/.ssh/config cp ./Config/.zshrc ~/.zshrc -# ASDF +# Shell -asdf plugin add dotnet https://github.com/hensou/asdf-dotnet -asdf plugin add elixir https://github.com/asdf-vm/asdf-elixir -asdf plugin add erlang https://github.com/asdf-vm/asdf-erlang -asdf plugin add golang https://github.com/kennyp/asdf-golang -asdf plugin add gradle https://github.com/rfrancis/asdf-gradle -asdf plugin add groovy https://github.com/weibemoura/asdf-groovy -asdf plugin add haskell https://github.com/vic/asdf-haskell -asdf plugin add java https://github.com/halcyon/asdf-java -asdf plugin add kotlin https://github.com/asdf-community/asdf-kotlin -asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs -asdf plugin add php https://github.com/asdf-community/asdf-php -asdf plugin add python https://github.com/danhper/asdf-python -asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby -asdf plugin add scala https://github.com/asdf-community/asdf-scala - -# .NET - -asdf install dotnet 7.0.100 -asdf global dotnet 7.0.100 - -# Java - -asdf install java temurin-19.0.1+10 -asdf global java temurin-19.0.1+10 - -# Erlang - -asdf install erlang 25.1.2 -asdf global erlang 25.1.2 - -# Elixir - -asdf install elixir 1.14.2-otp-25 -asdf global elixir 1.14.2-otp-25 +mkdir ~/.config +cp ./Config/starship.toml ~/.config/starship.toml +git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions +source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh +curl -sS https://starship.rs/install.sh | sh +chsh -s $(which zsh) # Firewall @@ -170,15 +128,6 @@ sudo ufw allow "Nginx Full" sudo ufw allow "OpenSSH" sudo ufw allow "Samba" -# Shell - -mkdir ~/.config -cp ./Config/starship.toml ~/.config/starship.toml -git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions -source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh -curl -sS https://starship.rs/install.sh | sh -chsh -s $(which zsh) - # Reboot sudo ufw enable diff --git a/Scripts/WSL.sh b/Scripts/UbuntuWSL.sh similarity index 56% rename from Scripts/WSL.sh rename to Scripts/UbuntuWSL.sh index b096796..cfe6968 100644 --- a/Scripts/WSL.sh +++ b/Scripts/UbuntuWSL.sh @@ -1,5 +1,15 @@ #!/usr/bin/env sh +# Change Password + +passwd + +# Add User + +adduser guilherme +sudo usermod -aG sudo guilherme +passwd guilherme + # Update sudo apt update && sudo apt upgrade -y @@ -22,7 +32,6 @@ sudo apt install -y --no-install-recommends \ git \ gnupg \ gzip \ - gzip \ htop \ iputils-ping \ libc6-dev \ @@ -39,9 +48,7 @@ sudo apt install -y --no-install-recommends \ nginx \ ninja-build \ python3 \ - samba \ tar \ - ufw \ unzip \ wget \ xz-utils \ @@ -89,43 +96,6 @@ cp ./Config/.ssh/config ~/.ssh/config cp ./Config/.zshrc ~/.zshrc -# ASDF - -asdf plugin add dotnet https://github.com/hensou/asdf-dotnet -asdf plugin add elixir https://github.com/asdf-vm/asdf-elixir -asdf plugin add erlang https://github.com/asdf-vm/asdf-erlang -asdf plugin add golang https://github.com/kennyp/asdf-golang -asdf plugin add gradle https://github.com/rfrancis/asdf-gradle -asdf plugin add groovy https://github.com/weibemoura/asdf-groovy -asdf plugin add haskell https://github.com/vic/asdf-haskell -asdf plugin add java https://github.com/halcyon/asdf-java -asdf plugin add kotlin https://github.com/asdf-community/asdf-kotlin -asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs -asdf plugin add php https://github.com/asdf-community/asdf-php -asdf plugin add python https://github.com/danhper/asdf-python -asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby -asdf plugin add scala https://github.com/asdf-community/asdf-scala - -# .NET - -asdf install dotnet 7.0.100 -asdf global dotnet 7.0.100 - -# Java - -asdf install java temurin-19.0.1+10 -asdf global java temurin-19.0.1+10 - -# Erlang - -asdf install erlang 25.1.2 -asdf global erlang 25.1.2 - -# Elixir - -asdf install elixir 1.14.2-otp-25 -asdf global elixir 1.14.2-otp-25 - # Shell mkdir ~/.config