초기상태
OS: OS X Sierra 10.12.5
$ php -v
PHP 5.6.30 (cli) (built: Feb 7 2017 16:18:37)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
Homebrew
Mac에 Homebrew를 인스톨하기
Homebrew로 PHP7검색
homebrew/php/php70 ✔ homebrew/php/php70-xdebug
homebrew/php/php70-amqp homebrew/php/php70-xmldiff
homebrew/php/php70-apcu homebrew/php/php70-xxtea
homebrew/php/php70-apcu-bc homebrew/php/php70-yac
homebrew/php/php70-ast homebrew/php/php70-yaf
homebrew/php/php70-blitz homebrew/php/php70-yaml
homebrew/php/php70-couchbase homebrew/php/php71 ✔
homebrew/php/php70-ds homebrew/php/php71-amqp
...
homebrew/php/php70-v8js
PHP7 인스톨
$ brew install homebrew/php/php71
brew install homebrew/php/php71
==> Tapping homebrew/php
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-php'...
remote: Counting objects: 685, done.
remote: Compressing objects: 100% (461/461), done.
remote: Total 685 (delta 448), reused 284 (delta 219), pack-reused 0
Receiving objects: 100% (685/685), 282.64 KiB | 0 bytes/s, done.
Resolving deltas: 100% (448/448), done.
Tapped 656 formulae (700 files, 1.3MB)
==> Installing php71 from homebrew/php
Path
.bash_profile에 추가
export PATH="$(brew --prefix homebrew/php/php71)/bin:$PATH"
확인
$ php -v
PHP 7.1.5 (cli) (built: May 13 2017 13:30:32) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
댓글 없음:
댓글 쓰기