1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

mac book Webエンジニア向けPCセットアップ

1
Last updated at Posted at 2026-02-05

chromeブラウザ

Safari を開く
google.com/chrome にアクセス
「Chromeをダウンロード」をクリック

git

git --version

これだけで「Xcode Command Line Toolsをインストールしますか?」と聞かれるはずです。

「インストール」をクリック

これでGitが入ります。

git-install01.png

git config --global user.name "your name"
git config --global user.email "your-email@example.com"

nvm

touch ~/.zshrc # Mac初期状態ではこのファイルが存在しない
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | bash

Command + Shift + .(ドット)でfinderで隠しファイルの表示ができます

ターミナルを再起動

Command + Q で閉じて、再度開く、Command + Space → 「ターミナル」と入力

nvm -v
0.40.2

.zshrc とは
zsh(シェル)の設定ファイルです。

ターミナルを開くたびに自動で読み込まれ、中に書かれた設定が適用されます。
例えば

nvmを使えるようにする設定
PATHの追加
エイリアス(ショートカットコマンド)の設定

Node.jsの安定版(LTS)をインストール

nvm install --lts
node -v
v24.13.0

Docker のインストール

Chromeで docker.com にアクセス
「Download Docker Desktop」をクリック
Mac with Apple chip を選択(M1/M2/M3の場合)

docker-install.png

ダウンロードされた .dmg ファイルを開く

Docker Desktopを起動すると失敗します
下記記事からRosettaをインストールする必要があるようです

softwareupdate --install-rosetta

PHP、Composer

PHP と Composer をHomebrewでインストール

https://brew.sh/ja/
homebrew-install.png

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

brew -v
Homebrew 5.0.13

phpをバージョン指定する場合、かえる場合

brew install php@8.2

brew install php@8.1
brew unlink php@8.2
brew link php@8.1

Homebrewでインストールした場合の場所
/opt/homebrew/etc/php/8.x

インストールしたPHPは自動的にパスが通らないため、シェルのプロファイルからパスを手動で通す必要があります。

echo 'export PATH="/opt/homebrew/opt/php@8.2/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

viで追加でターミナル再起動でもOKです

Composerをインストール

brew install composer
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?