LoginSignup
20
14

More than 1 year has passed since last update.

Mac HomebrewでPHPをインストールする

Last updated at Posted at 2020-09-27

目的

  • MacにHomebrewを使ってPHPを導入する方法をまとめる

実施環境

  • ハードウェア環境
項目 情報
OS macOS Catalina(10.15.5)
ハードウェア MacBook Pro (13-inch, 2020, Four Thunderbolt 3 ports)
プロセッサ 2 GHz クアッドコアIntel Core i5
メモリ 32 GB 3733 MHz LPDDR4
グラフィックス Intel Iris Plus Graphics 1536 MB
  • ソフトウェア環境
項目 情報 備考
Homebrew バージョン 7.4.8 Homwbrewを用いて導入

前提条件

  • Homebrewが導入され$ brewコマンドを実行できること。

前提情報

  • 本記事ではPHP 7.4をインストールするがインストール時のバージョン指定で他のバージョンもインストール可能である。

詳細

  1. 下記コマンドを実行してHomebrewを最新状態にする。

    brew upgrade
    
  2. 下記コマンドを実行してPHP 7.4をインストールする。

    brew install php@7.4
    
  3. 下記コマンドを実行してインストールされたPHPのバージョンを確認する。

    php -v
    
20
14
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
20
14