๊ด€๋ฆฌ ๋ฉ”๋‰ด

IT’s Portfolio

[Mac] M1 ๋งฅ๋ถ ๊ฐœ๋ฐœํ™˜๊ฒฝ ์ดˆ๊ธฐ ์„ธํŒ… ๋ณธ๋ฌธ

Development Study

[Mac] M1 ๋งฅ๋ถ ๊ฐœ๋ฐœํ™˜๊ฒฝ ์ดˆ๊ธฐ ์„ธํŒ…

f1r3_r41n 2022. 7. 15. 22:51
728x90
๋ฐ˜์‘ํ˜•

๐Ÿ’ป ๋งฅ๋ถ ๊ฐœ๋ฐœํ™˜๊ฒฝ ๊ตฌ์ถ•ํ•˜๊ธฐ

๊ธธ์—ˆ๋˜ ๊ตฐ์ƒํ™œ์ด ๋ง‰๋ฐ”์ง€์— ๋‹ค๋‹ค๋ž๋‹ค.

๋ฐ˜๋ณต๋˜๋˜ ์ผ๊ณผ์— ๋ฐฑ์ง€์žฅ์ด ๋˜์–ด๋ฒ„๋ฆฐ ๋‚˜์˜ ๋‡Œ์— ๊ธด์žฅ๊ฐ์„ ์ฃผ๊ธฐ ์œ„ํ•ด์„œ ๋งฅ๋ถ M1์„ ์งˆ๋Ÿฌ๋ฒ„๋ ธ๋‹ค..!

๋”ฐ๋ผ์„œ ์ƒˆ๋กœ ์ตํ˜€๋ณผ Rust ์™€ Golang , ์ด๋ฏธ ํ•˜๊ณ  ์žˆ๋Š” Python ์„ M1 ํ™˜๊ฒฝ์— ๋งž๊ฒŒ ๊ตฌ์ถ•ํ•ด๋ณด๋ ค๊ณ  ํ•œ๋‹ค.

๊ทธ ์ „์— ๋ฏธ๋ฆฌ ํ•ด์•ผ ํ•  ์„ค์ •์„ ์ด ๊ธ€์—์„œ ํ’€์–ด๋ณด๋ ค ํ•œ๋‹ค.

๐Ÿ’ก Install Homebrew

Homebrew

  • Homebrew๋Š” ๊ฐ์ข… ํ”„๋กœ๊ทธ๋žจ๊ณผ ํŒจํ‚ค์ง€๋“ค์„ ํ„ฐ๋ฏธ๋„ ํ™˜๊ฒฝ์—์„œ ์‰ฝ๊ฒŒ ์„ค์น˜ํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋„์™€์ฃผ๋Š” Mac์šฉ ํŒจํ‚ค์ง€ ๋งค๋‹ˆ์ €
  • ์—…๋ฐ์ดํŠธ์™€ ๊ด€๋ฆฌ๋ฅผ ๊ฐ„๋‹จํ•˜๊ฒŒ ํ•  ์ˆ˜ ์žˆ์Œ

M1์šฉ Homebrew install

iTerm์„ ์„ค์น˜ํ•˜๊ธฐ ์ „์ด๊ธฐ ๋•Œ๋ฌธ์— ๋งฅ์— ๊ธฐ๋ณธ์œผ๋กœ ์„ค์น˜๋˜์–ด ์žˆ๋Š” Terminal.app์„ ์‚ฌ์šฉํ•  ๊ฒƒ์ด๋‹ค.

~ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

์„ค์น˜ ํ›„ Next Step์˜ ๋ช…๋ น์–ด๋ฅผ ๋˜‘๊ฐ™์ด ์ ์šฉ์‹œ์ผœ์ค˜์•ผ ํ•จ

echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/<user_name>/.zprofile

eval "$(/opt/homebrew/bin/brew shellenv)"

M1 Homebrew๋Š” /opt/homebrew ๊ฒฝ๋กœ์— ์„ค์น˜๋จ

Basic Command

  • brew install <package_name>[@version]: ํŒจํ‚ค์ง€ ์„ค์น˜(@ํŠน์ •๋ฒ„์ „)
  • brew uninstall <package_name>: ํŒจํ‚ค์ง€ ์‚ญ์ œ
  • brew search <package_name: ํŒจํ‚ค์ง€ ๊ฒ€์ƒ‰
  • brew list: ์„ค์น˜๋˜์–ด ์žˆ๋Š” ํŒจํ‚ค์ง€ ํ™•์ธ
  • brew update: brew ์ตœ์‹ ๋ฒ„์ „์œผ๋กœ ์—…๋ฐ์ดํŠธ
  • brew info <package_name>: ํŒจํ‚ค์ง€ ์ •๋ณด๋ณด๊ธฐ
  • brew clean <package_name>: ํ•ด๋‹น ํŒจํ‚ค์ง€ ์ตœ์‹ ๋ฒ„์ „ ์ œ์™ธ ์ „๋ถ€ ์‚ญ์ œ

ADD TIP

brew install๊ณผ brew install --cask ์ฐจ์ด

  • ์ „์ž: ๋งฅ์šฉ ํŒจํ‚ค์ง€
  • ํ›„์ž: ๋งฅ์šฉ GUI ์‘์šฉ ํ”„๋กœ๊ทธ๋žจ
    • ~/Applications์— ์„ค์น˜๋จ
    • brew list --cask๋กœ ์„ค์น˜ํ•œ ํ”„๋กœ๊ทธ๋žจ ํ™•์ธ ๊ฐ€๋Šฅ

๐Ÿ’ก Install iTerm2 and Setting of iTerm2

iTerm2

  • ๋งฅ์˜ ๊ธฐ๋ณธ์•ฑ์ธ Terminal.app์„ ๋Œ€์ฒดํ•  ์ˆ˜ ์žˆ๋Š” emulator

iTerm2 install

Homebrew๋ฅผ ์ด์šฉํ•˜์—ฌ ์„ค์น˜

brew install --cask iterm2

Font Setting

  • D2Coding ์‚ฌ์šฉ
    • Download
    • Setting(Command + ,) - Profiles - Text

๐Ÿ’ก Install Oh My ZSH and Setting of O.M.S

Oh My ZSH

  • zsh๋ฅผ ํŽธ๋ฆฌํ•˜๊ฒŒ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ํ”„๋ ˆ์ž„์›Œํฌ

Oh My ZSH install

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

~/.zshrc Setting

  • theme, plugin setting
    • open ~/.zshrc๋กœ ํŒŒ์ผ ์—ด๊ธฐ
      • vi ํŽธ์ง‘ ํ”„๋กœ๊ทธ๋žจ ์‚ฌ์šฉ ๊ฐ€๋Šฅ -> vi ~/.zshrc
    • ZSH_THEME="robbyrussell"์„ ZSH_THEME="agnoster"๋กœ ๋ณ€๊ฒฝ
      • git ๊ด€๋ จ ์ •๋ณด๊ฐ€ ํ‘œ์‹œ๋˜์–ด ํŽธ๋ฆฌํ•œ ํ…Œ๋งˆ์ž„
    • brew install zsh-syntax-highlighting
      • ๋ฌธ๋ฒ• ํ•˜์ด๋ผ์ดํŒ… ํ”Œ๋Ÿฌ๊ทธ์ธ
      • ์กด์žฌํ•˜๋Š” ๋ช…๋ น์–ด์ด๋ฉด ์ดˆ๋ก์ƒ‰, ์กด์žฌํ•˜์ง€ ์•Š๋Š” ๋ช…๋ น์–ด์ด๋ฉด ๋นจ๊ฐ„์ƒ‰์œผ๋กœ ํ‘œํ˜„ํ•จ
      • .zshrc์— ๋‚ด์šฉ ์ถ”๊ฐ€(์ ์šฉํ•˜๊ธฐ)
        • source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
    • .zshrc ์ ์šฉ
      • source ~/.zshrc or iTerm2 ์žฌ์‹คํ–‰
728x90
๋ฐ˜์‘ํ˜•
Comments