Last active
May 21, 2022 15:58
-
-
Save AjkayAlan/9b209d88854154ed7140e50f15309e34 to your computer and use it in GitHub Desktop.
Setup steps for my raspberry pi 3b+ for development
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
## Getting image and Pi up and running | |
# Go to https://www.raspberrypi.org/downloads/raspbian/ and download an image, then unzip it | |
# Download https://www.balena.io/etcher/ and install it | |
# Plug in microsd card, Unzip the downloaded image and use Etcher to write the downloaded image to the SD card | |
# Edit boot/config.txt, and uncomment hdmi_force_hotplug=1 and hdmi_drive=2 | |
# Plug the PI in, and go through to setup prompts | |
# Run the following commands in terminal | |
## Config stuff | |
sudo raspi-config | |
# Go to Interfacing Options -> SSH, and enable it | |
# Go to Interfacing Options -> VNC, and enable it | |
# Go to Advanced Options -> Resolution, and set to 1920x1080 | |
# Go to Update | |
## Update & upgrade packages, install new firmware | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get dist-upgrade | |
## Install things needed for zsh and install zsh, oh my zsh, powerlevel10k theme, and powerline fonts | |
sudo apt-get install git zsh | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k | |
nano .zshrc | |
# Edit the line with ZSH_THEME to instead be (uncomment): | |
# ZSH_THEME="powerlevel10k/powerlevel10k" | |
# Add the following to the bottom (uncomment): | |
# POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir vcs) | |
sudo apt-get install fonts-powerline | |
# Go to Terminal -> Preferences, and set font to Powerline | |
exec zsh | |
## Install Homebrew | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)" | |
sudo apt-get install build-essential curl file git | |
nano .zshrc | |
# Add the following to the bottom (uncomment): | |
# eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv) | |
exec zsh | |
# In some case you may need to reboot, notably if your terminal isnt changing to zsh | |
## Option 1: Install pyenv, python, and pip | |
curl https://pyenv.run | bash | |
nano .zshrc | |
# Add the following to the bottom (uncomment): | |
# export PATH="/home/pi/.pyenv/bin:$PATH" | |
# eval "$(pyenv init -)" | |
# eval "$(pyenv virtualenv-init -)" | |
exec zsh | |
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl git | |
pyenv install 3.7.3 && pyenv global 3.7.3 | |
pip install -U pip | |
## Option 2: Alternative to pyenv (since it compiles python versions which takes a ton of time) | |
# Python3 is installed by default | |
pip install -U pip | |
## Install nvm, node, and npm | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash | |
nano .zshrc | |
# Add the following to the bottom (uncomment): | |
# export NVM_DIR="$HOME/.nvm" | |
# [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
# [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion | |
exec zsh | |
nvm install --lts | |
nvm use --lts | |
npm install -g npm@latest | |
## Install other useful things | |
#VSCode | |
sudo -s | |
. <( wget -O - https://code.headmelted.com/installers/apt.sh ) | |
exit | |
#AWS CLI | |
pip3 install --upgrade --user awscli | |
nano .zshrc | |
# Add the following to the bottom (uncomment): | |
# export PATH="$HOME/.local/bin:$PATH" | |
#AWS CDK | |
npm install -g aws-cdk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment