MAC OS中使用brew安裝php拓展
阿新 • • 發佈:2019-01-10
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
檢視拓展開啟沒有