Homebrew

来自开放百科 - 灰狐
2021年10月3日 (日) 08:15Allen (讨论 | 贡献)的版本

跳转到: 导航, 搜索
Wikipedia-35x35.png 您可以在Wikipedia上了解到此条目的英文信息 Homebrew Thanks, Wikipedia.

Homebrew:Mac OS X 平台下 Ruby 开发的包管理软件。

目录

安装

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

升级

brew update

使用

brew help

PHP

PHP 7

brew install homebrew/php/php70 // 详看安装信息
/usr/local/etc/php/7.0/php.ini

Apache httpd.conf

LoadModule php7_module    /usr/local/opt/php70/libexec/apache2/libphp7.so
   <FilesMatch .php$>
       SetHandler application/x-httpd-php
   </FilesMatch>
DirectoryIndex index.php index.html

FPM

mkdir -p ~/Library/LaunchAgents
cp /usr/local/opt/php70/homebrew.mxcl.php70.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php70.plist 
/usr/local/opt/php70/sbin/php70-fpm

Launched start

brew services start homebrew/php/php70

PHP 5

brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew options php56
brew install php56 --with-homebrew-openssl --with-homebrew-curl --with-apache
brew link php56
brew install php56-mcrypt
brew info php56
export PATH="$(brew --prefix homebrew/php/php56)/bin:$PATH"
php -v

apache module

LoadModule php5_module    /usr/local/opt/php56/libexec/apache2/libphp5.so

php.ini

/usr/local/etc/php/5.6/php.ini

更多信息:Homebrew PHP

链接

分享您的观点
个人工具
名字空间

变换
操作
导航
工具箱