DrupalCon Paris 2009
I've been spending a good deal of time setting up a local environment that works well. In the interest of saving other people time I've documented it. Hope this helps :)
Stack: MAMP
http://www.mamp.info/en/downloads/index.html
MAMP is very easy to install and runs php and apache separate from the default php and apache that comes with Mac OSX. This makes it much easier to 'control'.
Extract the Drupal install in the /Applications/MAMP/htdocs directory. Start up Mamp and in the preferences pane select 'Set to default Apache and MySQL ports'
Tip: The default timeout on php is 30 seconds which might be too short for batch runs etc. Edit the php.ini file (/Applications/MAMP/conf/php5.2/php.ini) and set
max_execution_time = 3000 ; Maximum execution time of each script, in seconds
Add the following line to the .bashrc file in your home direcotry. If the file does not exist, create it.
export PATH=$PATH:/Applications/MAMP/Library/bin:/Applications/MAMP/bin/php5.2/bin:~/bin
On the command line in your home dir run >. .bashrc
IDE: Netbeans
http://netbeans.org/downloads/
I only downloaded the php version - download the new Netbeans 7.0 beta
Add these configurations (Answer 2) to your config file to make sure Netbeans don't use 100% of you CPU and Memory
Netbeans have code completion which really helps with development. E.g. when you start typing 'drupal_set' and wait for a moment it will show all the functions that start with 'drupal_set' and their expected input parameters.
Xdebug:
Comes with MAMP
Set up: http://wiki.netbeans.org/HowToConfigureXDebug
In Netbeans go to Preference -> PHP. Set the Debugger port to 9000 and untick 'Stop at first line'
Now you can debug your Drupal application instead of writing a million print_r or dpr statements.
When I have time I might write a little tut on using XDebug.
Database Admin: SequelPro
http://www.sequelpro.com/download.html
Much nicer than PHPAdmin that comes with MAMP
Your initial setting are:
Add the setting to Favorites before connecting.
MySQL Tips:
MySQL needs a bit of love. Copy /Applications/MAMP/Library/share/mysql/my-large.cnf to /Applications/MAMP/Library/my.cnf
Open my.cnf
Change the entry max_allowed packets to 'max_allowed_packet = 16M'.
Comment out the lines 'log-bin=mysql-bin' and 'binlog_format=mixed'. Otherwise MySQL write these HUGE binary logs of each database transaction.
Versioning: Git
http://git-scm.com/
Git IDE: GitX http://gitx.frim.nl/
I use the command line for commits, push, pull etc.
The IDE is wonderful when you have to merge branches because it gives a visual display
Happy Coding!