0
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

PC購入後の環境設定(Mac Catalina)

Posted at

シェルの設定

# zshをデフォルトに設定
% chsh -s /bin/zsh

# ログインシェルを表示
% echo $SHELL
# 以下のように表示されれば成功
/bin/zsh

Command Line Tools

% xcode-select --install

Homebrew

% cd  # ホームディレクトリに移動
% pwd  # ホームディレクトリにいるかどうか確認
% /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" # コマンドを実行
# PasswordはMacのパスワード
# 最新状態に
% brew update

# 権限の変更
%  sudo chown -R `whoami`:admin /usr/local/bin

Ruby

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

rbenvのパスを通す
% echo 'eval "$(rbenv init -)"' >> ~/.zshrc

# zshrcの変更を反映
% source ~/.zshrc
readlineインストール
% brew install readline
% brew link readline --force
# Rubyインストール
% RUBY_CONFIGURE_OPTS="--with-readline-dir=$(brew --prefix readline)"
% rbenv install 2.6.5

# Rubyバージョン指定
% rbenv global 2.6.5

# rbenvを読み込んで変更を反映
% rbenv rehash

MySQL

% brew install mysql@5.6

# 自動起動設定
% mkdir ~/Library/LaunchAgents 
% ln -sfv /usr/local/opt/mysql\@5.6/*.plist ~/Library/LaunchAgents
% launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql\@5.6.plist 

# パスを通す
% echo 'export PATH="/usr/local/opt/mysql@5.6/bin:$PATH"' >> ~/.zshrc # mysqlのコマンドを実行できるようにする設定
% source ~/.zshrc #  設定を読み込むコマンド
% which mysql # mysqlのコマンドが打てるか確認する

# 起動確認
% mysql.server status # MySQLの状態を確認するコマンド

shared-mime-info

% brew install shared-mime-info

Rails

# bundlerインストール
% gem install bundler --version='2.1.4'

# Railsインストール
% gem install rails --version='6.0.0'

% rbenv rehash

Node.js

brew install node@14

# パスを通す
% echo 'export PATH="/usr/local/opt/node@14/bin:$PATH"' >> ~/.zshrc
% source ~/.zshrc

yarn

% brew install yarn
0
3
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
0
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?