MAC OS 中使用 brew 安裝 php 拓展 (新版已經不能這樣安裝)

MAC OS中brew安裝的PHP使用brew安裝拓展

PHP拓展(可裝可不裝,brew拓展方便)

MongoDb拓展(前面安裝的是數據庫)

安裝前先search

brew search mongo

PHP56 安裝 MongoDb拓展

sphp 56
brew install php56-mongo

PHP71 安裝 MongoDb拓展

sphp 71
brew install php71-mongodb

重啓sudo apachectl -k restart ,然後http://localhost查看拓展開啓沒有

PHP各個版本安裝xdebug拓展

PHP56 安裝 xdebug拓展

sphp 56
brew install php56-xdebug

PHP71 安裝 xdebug拓展

sphp 71
brew install php71-xdebug

重啓sudo apachectl -k restart ,然後http://localhost查看拓展開啓沒有

PHP安裝YAML,symfony框架使用速度提高x5

PHP56 安裝 YAML拓展

sphp 56
brew install php56-yaml

PHP71 安裝 YAML拓展

sphp 71
brew install php71-yaml

安裝 OPcache and APCu(緩存機制,加快PHP的編譯速度)

在PHP56裏面安裝

$ sphp 56
$ brew install php56-opcache
$ brew install php56-apcu

在PHP71裏面安裝

$ sphp 71
$ brew install php71-opcache
$ brew install php71-apcu

重啓sudo apachectl -k restart ,然後http://localhost查看拓展開啓沒有

發佈了35 篇原創文章 · 獲贊 7 · 訪問量 13萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章