LoginSignup
1
1
はじめての記事投稿

m1 Macの環境構築

Last updated at Posted at 2023-07-17

はじめに

個人的な環境構築の備忘録です。

Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo '# Set PATH, MANPATH, etc., for Homebrew.' >> /Users/rintarofukui/.zprofile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/rintarofukui/.zprofile`
eval "$(/opt/homebrew/bin/brew shellenv)"

iterm2とoh-my-zsh

# iterm2のインストール
brew install iterm2 --cask

# JetBrains Monoのインストール
brew tap homebrew/cask-fonts
brew install font-jetbrains-mono

# oh-my-zshの導入
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

よく利用するアプリケーション

# Chrome
brew install google-chrome --cask

# Slack
brew install slack --cask

# Discord
brew install discord --cask

# Zoom
brew install zoom --cask

Git

# Gitのインストール
brew install git

# fast-forwardしないように設定
git config --global --add merge.ff false
git config --global --add pull.ff only

Docker

# Dockerのインストール
brew install docker --cask

Tex

# mactex-no-guiのインストール
brew install mactex-no-gui --cask

# rezsh
exec $SHELL -l

vscodeにLaTex Workshopをインストール

vscodeのsetting.jsonに下を追記

setting.json
{
  "latex-workshop.latex.tools": [
    {
      "command": "latexmk",
      "args": [
        "-e",
        "$latex=q/platex %O -synctex=1 -interaction=nonstopmode -file-line-error %S/",
        "-e",
        "$bibtex=q/pbibtex %O %B/",
        "-e",
        "$biber=q/biber %O --bblencoding=utf8 -u -U --output_safechars %B/",
        "-e",
        "$makeindex=q/mendex %O -o %D %S/",
        "-e",
        "$dvipdf=q/dvipdfmx %O -o %D %S/",
        "-norc",
        "-pdfdvi",
        "%DOC%"
      ],
      "name": "latexmk"
    }
  ],
  "latex-workshop.latex.recipes": [
    {
      "name": "latexmk (tex to PDF)",
      "tools": ["latexmk"]
    }
  ],
  "latex-workshop.view.pdf.viewer": "tab",
  "latex-workshop.latex.clean.subfolder.enabled": true,
  "latex-workshop.latex.autoClean.run": "onBuilt",
  "latex-workshop.latex.clean.fileTypes": [
    "*.aux",
    "*.bbl",
    "*.blg",
    "*.idx",
    "*.ind",
    "*.lof",
    "*.lot",
    "*.out",
    "*.toc",
    "*.acn",
    "*.acr",
    "*.alg",
    "*.glg",
    "*.glo",
    "*.gls",
    "*.ist",
    "*.fls",
    "*.log",
    "*.fdb_latexmk",
    "*.dvi",
    "*.synctex.gz"
  ]
}

Python

# pyenvのインストール
brew install pyenv

# pyenvのパスを通す
echo 'eval "$(pyenv init --path)"' >> ~/.zprofile
echo 'eval "$(pyenv init -)"' >> ~/.zshrc

# バージョンを指定してインストール
pyenv install <バージョンを指定>
pyenv global <バージョンを指定>

R

# Rのインストール
brew install r

# RStudioのインストール
brew install rstudio --cask

Ruby

# ruby-buildとrbenvのインストール
brew install ruby-build rbenv

# rbenvのパスを通す
export PATH="$HOME/.rbenv/bin:$PATH"
echo 'eval "$(rbenv init -)"' >> ~/.zshrc

# バージョンを指定してインストール
rbenv install <バージョンを指定>
rbenv global <バージョンを指定>

Node.js

# nvmをインストール
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

# エラー回避
softwareupdate --install-rosetta

# バージョン指定してインストール
nvm install <バージョンを指定>
nvm use <バージョンを指定>
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1