Created
August 14, 2023 19:14
-
-
Save TiagoDanin/2f788ea4b7c335a512cb6998381e1025 to your computer and use it in GitHub Desktop.
Install WSL Ubuntu 22 + Elixir
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
# Configurations | |
WINDOWS_USERNAME="tiago" | |
# END | |
echo "Installing WSL Ubuntu 22" | |
sudo apt update | |
sudo apt install neofetch | |
neofetch | |
echo "Install zsh" | |
sudo apt install zsh curl git | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH/plugins/zsh-autosuggestions | |
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH/plugins/zsh-syntax-highlighting | |
ls $ZSH/plugins | |
sed -i 's/plugins=(git)/plugins=(git z zsh-autosuggestions zsh-syntax-highlighting)/g' .zshrc | |
zsh | |
echo "Install asdf and elixir dependencies" | |
sudo apt install unzip libssl-dev make automake libncurses5-dev gcc g++ inotify-tools | |
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.12.0 | |
echo '\n# ASDF\n. "$HOME/.asdf/asdf.sh"' >> .zshrc | |
zsh | |
asdf plugin add erlang | |
asdf plugin add elixir | |
echo "Install sass dependencies" | |
sudo apt install libsass-dev sassc wkhtmltopdf | |
echo "Install PostgreSQL dependencies" | |
sudo apt-get install postgresql postgis | |
echo "Password is: postgres" | |
sudo passwd postgres | |
sudo service postgresql start | |
echo "To conntect to postgres: sudo -u postgres psql" | |
sudo sed -i "s/scram-sha-256/trust/g" /etc/postgresql/14/main/pg_hba.conf | |
sudo service postgresql restart | |
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb | |
echo "Share SSH with WSL" | |
sudo apt install keychain | |
cp "/mnt/c/Users/$WINDOWS_USERNAME/.ssh/id_rsa" ~/.ssh | |
cp "/mnt/c/Users/$WINDOWS_USERNAME/.ssh/id_rsa.pub" ~/.ssh | |
cp "/mnt/c/Users/$WINDOWS_USERNAME/.ssh/known_hosts" ~/.ssh | |
chmod 600 ~/.ssh/id_rsa | |
echo "Share GitConfig with WSL" | |
cp "/mnt/c/Users/$WINDOWS_USERNAME/.gitconfig" ~/.gitconfig | |
echo "Finished" | |
neofetch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment