Created
August 16, 2012 17:17
-
-
Save zhuangya/3371803 to your computer and use it in GitHub Desktop.
brew installed php5.4 notes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ brew install php54 --width-mysql --with-intl --with-fpm --without-apache | |
==> Installing php54 dependency: icu4c | |
==> Downloading http://download.icu-project.org/files/icu4c/49.1.2/icu4c-49_1_2- | |
######################################################################## 100.0% | |
==> ./configure --prefix=/usr/local/Cellar/icu4c/49.1.2 --disable-samples --disa | |
==> make | |
==> make install | |
==> Caveats | |
This formula is keg-only, so it was not symlinked into /usr/local. | |
Conflicts; see: https://github.com/mxcl/homebrew/issues/issue/167 | |
Generally there are no consequences of this for you. | |
If you build your own software and it requires this formula, you'll need | |
to add its lib & include paths to your build variables: | |
LDFLAGS -L/usr/local/Cellar/icu4c/49.1.2/lib | |
CPPFLAGS -I/usr/local/Cellar/icu4c/49.1.2/include | |
==> Summary | |
/usr/local/Cellar/icu4c/49.1.2: 228 files, 50M, built in 5.5 minutes | |
==> Installing php54 dependency: zlib | |
==> Downloading http://zlib.net/zlib-1.2.7.tar.gz | |
######################################################################## 100.0% | |
==> Patching | |
patching file configure | |
==> ./configure --prefix=/usr/local/Cellar/zlib/1.2.7 | |
==> make install | |
==> Caveats | |
This formula is keg-only, so it was not symlinked into /usr/local. | |
Mac OS X already provides this software and installing another version in | |
parallel can cause all kinds of trouble. | |
Generally there are no consequences of this for you. | |
If you build your own software and it requires this formula, you'll need | |
to add its lib & include paths to your build variables: | |
LDFLAGS -L/usr/local/Cellar/zlib/1.2.7/lib | |
CPPFLAGS -I/usr/local/Cellar/zlib/1.2.7/include | |
==> Summary | |
/usr/local/Cellar/zlib/1.2.7: 9 files, 380K, built in 10 seconds | |
==> Installing php54 | |
==> Downloading http://www.php.net/get/php-5.4.5.tar.bz2/from/this/mirror | |
######################################################################## 100.0% | |
Warning: Backing up all known pear.conf files | |
Warning: If you have a pre-existing pear install outside | |
of homebrew-php, and you are using a non-standard | |
pear.conf location, installation may fail. | |
==> ./configure --prefix=/usr/local/Cellar/php54/5.4.5 --disable-debug --localst | |
==> make | |
==> make install | |
==> /usr/local/Cellar/php54/5.4.5/bin/pear config-set php_ini /usr/local/etc/php | |
==> Caveats | |
For 10.5 and Apache: | |
Apache needs to run in 32-bit mode. You can either force Apache to start | |
in 32-bit mode or you can thin the Apache executable. | |
To enable PHP in Apache add the following to httpd.conf and restart Apache: | |
LoadModule php5_module /usr/local/Cellar/php54/5.4.5/libexec/apache2/libphp5.so | |
The php.ini file can be found in: | |
/usr/local/etc/php/5.4/php.ini | |
If pear complains about permissions, 'Fix' the default PEAR permissions and config: | |
chmod -R ug+w /usr/local/Cellar/php54/5.4.5/lib/php | |
pear config-set php_ini /usr/local/etc/php/5.4/php.ini | |
If you are having issues with custom extension compiling, ensure that this php is | |
in your PATH: | |
PATH="$(brew --prefix josegonzalez/php/php54)/bin:$PATH" | |
If you have installed the formula with --with-fpm, to launch php-fpm on startup: | |
* If this is your first install: | |
mkdir -p ~/Library/LaunchAgents | |
cp /usr/local/Cellar/php54/5.4.5/homebrew-php.josegonzalez.php54.plist ~/Library/LaunchAgents/ | |
launchctl load -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php54.plist | |
* If this is an upgrade and you already have the homebrew-php.josegonzalez.php54.plist loaded: | |
launchctl unload -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php54.plist | |
cp /usr/local/Cellar/php54/5.4.5/homebrew-php.josegonzalez.php54.plist ~/Library/LaunchAgents/ | |
launchctl load -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php54.plist | |
You may also need to edit the plist to use the correct "UserName". | |
Please note that the plist was called 'org.php-fpm.plist' in old versions | |
of this formula. | |
==> Summary | |
/usr/local/Cellar/php54/5.4.5: 465 files, 36M, built in 4.2 minutes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment