Skip to content

Instantly share code, notes, and snippets.

@randika
Forked from niepi/osx_php_homebrew.setup.md
Created January 21, 2014 07:27

Revisions

  1. @niepi niepi revised this gist Feb 29, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion osx_php_homebrew.setup.md
    Original file line number Diff line number Diff line change
    @@ -64,7 +64,7 @@ if you don't have autoconf (Xcode 4.3) install autoconf
    $ pecl installxdebug apc


    ## xdebug setup
    ### xdebug setup

    and change

  2. @niepi niepi revised this gist Feb 29, 2012. 1 changed file with 11 additions and 9 deletions.
    20 changes: 11 additions & 9 deletions osx_php_homebrew.setup.md
    Original file line number Diff line number Diff line change
    @@ -1,30 +1,32 @@
    ## install php with mysql pgsql intl support
    ## install php

    with mysql pgsql intl support

    $ brew install php --with-apache --with-mysql --with-pgsql --with-intl

    ## set php timezone in php ini
    ### set php timezone in php ini

    date.timezone = Europe/Vienna

    ## load php module in apache
    ### load php module in apache

    in /private/etc/apache2/httpd.conf add

    LoadModule php5_module $FULLPATH/libphp5.so

    ## fix pear permissions and config
    ### fix pear permissions and config

    $ chmod -R ug+w /usr/local/Cellar/php/5.3.10/lib/php
    $ pear config-set php_ini /usr/local/etc/php.ini

    ##
    ## install mysql

    $ brew install mysql

    ## install mysql default tables
    ### install mysql default tables

    $ unset TMPDIR
    $ mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp

    $ brew install mysql
    $ mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp

    ### set mysql up to start automatically on system boot:

  3. @niepi niepi revised this gist Feb 29, 2012. 1 changed file with 25 additions and 3 deletions.
    28 changes: 25 additions & 3 deletions osx_php_homebrew.setup.md
    Original file line number Diff line number Diff line change
    @@ -17,21 +17,42 @@ in /private/etc/apache2/httpd.conf add
    $ chmod -R ug+w /usr/local/Cellar/php/5.3.10/lib/php
    $ pear config-set php_ini /usr/local/etc/php.ini

    ##

    ## install mysql default tables

    $ unset TMPDIR
    $ mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp

    ## set mysql up to start automatically on system boot:
    $ brew install mysql

    ### set mysql up to start automatically on system boot:

    $ mkdir -p ~/Library/LaunchAgents
    $ cp /usr/local/Cellar/mysql/5.5.10/com.mysql.mysqld.plist ~/Library/LaunchAgents/
    $ launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist

    ## Start mysql:
    ### Start mysql:

    $ mysql.server start

    ## install postgresql

    $ brew install postgresql

    ### initialize the DB

    initdb /usr/local/var/postgres

    ### add startup items

    cp /usr/local/Cellar/postgresql/9.0.1/org.postgresql.postgres.plist ~/Library/LaunchAgents
    launchctl load -w ~/Library/LaunchAgents/org.postgresql.postgres.plist

    ### start Postgres

    pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start

    ## install xdebug & apc

    if you don't have autoconf (Xcode 4.3) install autoconf
    @@ -73,4 +94,5 @@ PHP_Depend, PHP_CodeSniffer, File_Iterator Text_Template, PHP_Timer, YAML, Conso
    ## resources

    - http://chielkunkels.com/setting-up-a-dev-environment-on-osx.html
    - http://www.technosophos.com/content/debugging-your-php-code-xdebug-mamp-textmate-and-macgdbp-support
    - http://www.technosophos.com/content/debugging-your-php-code-xdebug-mamp-textmate-and-macgdbp-support
    - http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x
  4. @niepi niepi revised this gist Feb 28, 2012. No changes.
  5. @niepi niepi renamed this gist Feb 28, 2012. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  6. @niepi niepi revised this gist Feb 28, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    ## php mit mysql pgsql intl
    ## install php with mysql pgsql intl support

    $ brew install php --with-apache --with-mysql --with-pgsql --with-intl

  7. @niepi niepi revised this gist Feb 28, 2012. 1 changed file with 12 additions and 12 deletions.
    24 changes: 12 additions & 12 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -6,23 +6,23 @@

    date.timezone = Europe/Vienna

    ## load php in apache
    ## load php module in apache

    in /private/etc/apache2/httpd.conf add

    LoadModule php5_module $FULLPATH/libphp5.so

    ## After this, fix PEAR’s permissions and config:
    ## fix pear permissions and config

    $ chmod -R ug+w /usr/local/Cellar/php/5.3.6/lib/php
    $ chmod -R ug+w /usr/local/Cellar/php/5.3.10/lib/php
    $ pear config-set php_ini /usr/local/etc/php.ini

    ## Install mysql’s default tables:
    ## install mysql default tables

    $ unset TMPDIR
    $ mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp

    ## Set mysql up to start automatically on system boot:
    ## set mysql up to start automatically on system boot:

    $ mkdir -p ~/Library/LaunchAgents
    $ cp /usr/local/Cellar/mysql/5.5.10/com.mysql.mysqld.plist ~/Library/LaunchAgents/
    @@ -34,32 +34,32 @@ in /private/etc/apache2/httpd.conf add

    ## install xdebug & apc

    if you don't have autoconf (Xcode 4.3)
    if you don't have autoconf (Xcode 4.3) install autoconf

    $ brew install autoconf

    $ pecl installxdebug apc


    ## Xdebug setup
    ## xdebug setup

    and change string:
    and change

    extension=xdebug.so
    
to:
    
to

    zend_extension="$fullpath/xdebug.so"
    xdebug.remote_enable = On
    xdebug.remote_autostart = 1

    ## install pear stuff
    ## install pear packages

    ### some php Q/A tools
    ### php q/a tools

    $ pear config-set auto_discover 1
    $ pear install pear.phpqatools.org/phpqatools pear.netpirates.net/phpDox

    This will install:
    this will install:

    PHP_Depend, PHP_CodeSniffer, File_Iterator Text_Template, PHP_Timer, YAML, Console_CommandLine, Log, PHP_TokenStream, Base, PHP_PMD, PHP_CodeBrowser, PHP_CodeCoverage, PHPUnit_MockObject, ConsoleTools, PHPUnit, phpcpd, phploc, phpqatools

  8. @niepi niepi revised this gist Feb 28, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -72,5 +72,5 @@ PHP_Depend, PHP_CodeSniffer, File_Iterator Text_Template, PHP_Timer, YAML, Conso

    ## resources

    - [http://chielkunkels.com/setting-up-a-dev-environment-on-osx.html]
    - [http://www.technosophos.com/content/debugging-your-php-code-xdebug-mamp-textmate-and-macgdbp-support]
    - http://chielkunkels.com/setting-up-a-dev-environment-on-osx.html
    - http://www.technosophos.com/content/debugging-your-php-code-xdebug-mamp-textmate-and-macgdbp-support
  9. @niepi niepi revised this gist Feb 28, 2012. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -68,3 +68,9 @@ PHP_Depend, PHP_CodeSniffer, File_Iterator Text_Template, PHP_Timer, YAML, Conso
    $ pear config-set preferred_state beta
    $ pear install phing/phing
    $ pear config-set preferred_state stable


    ## resources

    - [http://chielkunkels.com/setting-up-a-dev-environment-on-osx.html]
    - [http://www.technosophos.com/content/debugging-your-php-code-xdebug-mamp-textmate-and-macgdbp-support]
  10. @niepi niepi revised this gist Feb 28, 2012. 1 changed file with 1 addition and 19 deletions.
    20 changes: 1 addition & 19 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -61,25 +61,7 @@ and change string:

    This will install:

    - PHP_Depend
    - PHP_CodeSniffer
    - File_Iterator
    - Text_Template
    - PHP_Timer
    - YAML
    - Console_CommandLine
    - Log
    - PHP_TokenStream
    - Base
    - PHP_PMD
    - PHP_CodeBrowser
    - PHP_CodeCoverage
    - PHPUnit_MockObject
    - ConsoleTools
    - PHPUnit
    - phpcpd
    - phploc
    - phpqatools
    PHP_Depend, PHP_CodeSniffer, File_Iterator Text_Template, PHP_Timer, YAML, Console_CommandLine, Log, PHP_TokenStream, Base, PHP_PMD, PHP_CodeBrowser, PHP_CodeCoverage, PHPUnit_MockObject, ConsoleTools, PHPUnit, phpcpd, phploc, phpqatools

    ### install phing
    $ pear channel-discover pear.phing.info
  11. @niepi niepi renamed this gist Feb 28, 2012. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  12. @niepi niepi created this gist Feb 28, 2012.
    88 changes: 88 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,88 @@
    ## php mit mysql pgsql intl

    $ brew install php --with-apache --with-mysql --with-pgsql --with-intl

    ## set php timezone in php ini

    date.timezone = Europe/Vienna

    ## load php in apache

    in /private/etc/apache2/httpd.conf add

    LoadModule php5_module $FULLPATH/libphp5.so

    ## After this, fix PEAR’s permissions and config:

    $ chmod -R ug+w /usr/local/Cellar/php/5.3.6/lib/php
    $ pear config-set php_ini /usr/local/etc/php.ini

    ## Install mysql’s default tables:

    $ unset TMPDIR
    $ mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp

    ## Set mysql up to start automatically on system boot:

    $ mkdir -p ~/Library/LaunchAgents
    $ cp /usr/local/Cellar/mysql/5.5.10/com.mysql.mysqld.plist ~/Library/LaunchAgents/
    $ launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist

    ## Start mysql:

    $ mysql.server start

    ## install xdebug & apc

    if you don't have autoconf (Xcode 4.3)

    $ brew install autoconf

    $ pecl installxdebug apc


    ## Xdebug setup

    and change string:

    extension=xdebug.so
    
to:

    zend_extension="$fullpath/xdebug.so"
    xdebug.remote_enable = On
    xdebug.remote_autostart = 1

    ## install pear stuff

    ### some php Q/A tools

    $ pear config-set auto_discover 1
    $ pear install pear.phpqatools.org/phpqatools pear.netpirates.net/phpDox

    This will install:

    - PHP_Depend
    - PHP_CodeSniffer
    - File_Iterator
    - Text_Template
    - PHP_Timer
    - YAML
    - Console_CommandLine
    - Log
    - PHP_TokenStream
    - Base
    - PHP_PMD
    - PHP_CodeBrowser
    - PHP_CodeCoverage
    - PHPUnit_MockObject
    - ConsoleTools
    - PHPUnit
    - phpcpd
    - phploc
    - phpqatools

    ### install phing
    $ pear channel-discover pear.phing.info
    $ pear config-set preferred_state beta
    $ pear install phing/phing
    $ pear config-set preferred_state stable