欢迎大家赞助一杯啤酒🍺 我们准备了下酒菜:Formal mathematics/Isabelle/ML, Formal verification/Coq/ACL2, C++/F#/Lisp
Homebrew
来自开放百科 - 灰狐
(版本间的差异)
小 (→安装) |
小 (→使用) |
||
(未显示1个用户的14个中间版本) | |||
第1行: | 第1行: | ||
{{SeeWikipedia|Homebrew (package management software)}} | {{SeeWikipedia|Homebrew (package management software)}} | ||
− | Homebrew:[[Mac OS X]] | + | Homebrew:[[Mac OS X]] 平台下 [[Ruby]] 开发的包管理软件。 |
+ | |||
+ | ==简介== | ||
+ | [[RubyGems]] | ||
==安装== | ==安装== | ||
− | + | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" | |
brew doctor | brew doctor | ||
第12行: | 第15行: | ||
==使用== | ==使用== | ||
brew help | brew help | ||
+ | |||
+ | ==Error== | ||
+ | [https://lxadm.com/error-caskroom-cask-was-moved-tap-homebrew-cask-instead/ Solving Error: Caskroom/Cask Was Moved: Switch to Homebrew/Cask for Easy Fix] | ||
+ | brew untap caskroom/cask | ||
+ | brew tap homebrew/cask | ||
+ | brew update | ||
+ | brew upgrade | ||
+ | |||
+ | ==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 | ||
+ | 更多信息:[https://github.com/Homebrew/homebrew-php Homebrew PHP] | ||
==链接== | ==链接== | ||
− | *[ | + | *[https://github.com/Homebrew Homebrew @ GitHub] |
+ | *[https://formulae.brew.sh/ Homebrew Formulae] | ||
[[category:package]] | [[category:package]] | ||
[[category:ruby]] | [[category:ruby]] | ||
− | [[category: | + | [[category:macOS]] |
+ | [[category:linux]] |
2023年8月4日 (五) 14:32的最后版本
您可以在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
[编辑] Error
Solving Error: Caskroom/Cask Was Moved: Switch to Homebrew/Cask for Easy Fix
brew untap caskroom/cask brew tap homebrew/cask brew update brew upgrade
[编辑] 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
[编辑] 链接
分享您的观点