Homebrew

来自开放百科 - 灰狐
(版本间的差异)
跳转到: 导航, 搜索
(使用)
 
(未显示1个用户的18个中间版本)
第1行: 第1行:
 
{{SeeWikipedia|Homebrew (package management software)}}
 
{{SeeWikipedia|Homebrew (package management software)}}
  
Homebrew:[[Mac OS X]] 平台的 [[Ruby]] 包管理软件。
+
Homebrew:[[Mac OS X]] 平台下 [[Ruby]] 开发的包管理软件。
 +
 
 +
==简介==
 +
[[RubyGems]]
  
 
==安装==
 
==安装==
  ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
+
  /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
 +
brew doctor
 +
 
 +
==升级==
 +
brew update
 +
 
 +
==使用==
 +
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]
  
 
==链接==
 
==链接==
*[http://github.com/mxcl/homebrew homebrew @ github]
+
*[https://github.com/Homebrew Homebrew @ GitHub]
 +
*[https://formulae.brew.sh/ Homebrew Formulae]
  
 
[[category:package]]
 
[[category:package]]
 
[[category:ruby]]
 
[[category:ruby]]
[[category:Mac OS X]]
+
[[category:macOS]]
 +
[[category:linux]]

2023年8月4日 (五) 14:32的最后版本

Wikipedia-35x35.png 您可以在Wikipedia上了解到此条目的英文信息 Homebrew Thanks, Wikipedia.

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

目录

[编辑] 简介

RubyGems

[编辑] 安装

/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

[编辑] 链接

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

变换
操作
导航
工具箱