라즈베리파이 맛갔을때 세팅

KiJungKong·2023년 9월 10일
0

Raspberry Pi Imager 설치: Raspberry Pi OS – Raspberry Pi

Raspberry pi OS (64-bit)를 메모리카드에 쓰고 라즈베리파이에 장착

나라를 United Kingdom, 언어를 English로 설정 나머지는 알아서 ㅎㅎ

한글 설정

sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt install fonts-nanum -y
sudo apt install fcitx fcitx-hangul -y
sudo vi /etc/default/im-config
# IM_CONFIG_DEFAULT_MODE=fcitx
# IM_CONFIG_DEFAULT_MODE를 auto에서 fcitx로 수정

im-config -a
# 계속 yes누르고 default모드로 설정

sudo raspi-config
# localization options에 들어가서 en_US.UTF-8, ko_KR.UTF-8 스페이스바로 선택 후 ko_KR.UTF-8를 기본값으로 설정

# (출처: https://ddangeun.tistory.com/117)

폴더 만들기

mkdir ~/works ~/tools

zsh 설치

sudo apt install zsh -y
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" 
# (출처: https://ohmyz.sh/#install)

vi ~/.zshrc
# ZSH_THEME="agnoster" 로 수정

zsh 멀티라인 테마 적용

vi ~/.oh-my-zsh/themes/agnoster.zsh-theme

맨 아래에

## Main prompt
build_prompt() {
  RETVAL=$?
  prompt_status
  prompt_virtualenv
  prompt_context
  prompt_dir
  prompt_git
  prompt_bzr
  prompt_hg
  prompt_newline # 멀티라인 적용
  prompt_end
}

# 멀티라인 적용, 커버모양 변경
prompt_newline() {
  if [[ -n $CURRENT_BG ]]; then
    echo -n "%{%k%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR
%(?.%F{$CURRENT_BG}.%F{red})❯%f"

  else
    echo -n "%{%k%}"
  fi

  echo -n "%{%f%}"
  CURRENT_BG=''
}

위 내용을 추가

zsh-syntax-highlighting 설치

cd ~/tools
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
source ./zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

# 적용
source ~/.zshrc 

Miniforge 설치

cd ~/tools
wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh
chmod 755 Miniforge3-Linux-aarch64.sh
./Miniforge3-Linux-aarch64.sh
# ~/tools/Miniforge3에 설치

source ~/.zshrc

conda search python 
# 원하는 파이썬 버전을 찾고 
conda create -n <원하는 이름> python=<버전 ex.3.11.0>

# conda 자동 활성화 해제를 위해
conda activate base
conda config --set auto_activate_base false

neovim 설치 (build하여 설치)

cd ~/tools

# Build prerequisites
sudo apt-get install make ninja-build gettext cmake unzip curl -y

git clone https://github.com/neovim/neovim
cd neovim && make CMAKE_BUILD_TYPE=RelWithDebInfo
sudo make install

npm, cargo 설치

sudo apt install npm -y
curl https://sh.rustup.rs -sSf | sh -s 

# lunarvim 설치시 nodejs의 dependency를 갖고있는 플러그인을 설치할 때 문제가 발생하는것을 막기 위해
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH=~/.npm-global/bin:$PATH
source ~/.profile

lunarvim 설치

bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/master/utils/installer/install.sh)

vi ~/.zshrc
# 맨 밑에
alias v=“/home/ubuntu/.local/bin/lvim”
# 를 추가한다.

source ~/.zshrc
# 이제 v로 lunarvim을 실행할 수 있다.
profile
공기정

0개의 댓글

관련 채용 정보