Aegir on OS X: Surviving the Lion -> Mountain Lion upgrade path

Now that Apple has seen fit for our our king of the jungle to live in the mountains, we've had a chance to test how well our Aegir setup instructions survive the ascent. If you had alreay set up Aegir using our instructions when you were on Lion here are the instructions to get you past the rocky outrcrops after upgrading to Mountain Lion.
If you haven't ever set up aegir on your Mac with our instructions you can do the full install by following our instructions at: nginx / MariaDB / PHP / Aegir on Mac OS X with optional Drush 5 (works on Mountain Lion!)
To fix your existing install continue reading below.
XCode Command Line Tools needs to be re-installed- Open XCode
- Install Device support
- Open XCode prefs and click the Downloads section
- Click Install button for "Command Line Tools"
- Let everyone know where Xcode is
$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
- Install X11: Visit http://xquartz.macosforge.org/trac/wiki and download and install version 2.7.2+.
- You will need to fix the symlink it makes
$ sudo ln -s /opt/X11 /usr/X11
- First test if you are able to email yourself
$ date | mail -s test you@youremail.com
- If you are on Mountain Lion you need to create and set the permissions for these directories first (for DP4 at least)
$ sudo mkdir /Library/Server /Library/Server/Mail /Library/Server/Mail/Data /Library/Server/Mail/Data/spool /Library/Server/Mail/Data/spool/maildrop $ sudo chown _postfix:_postdrop /Library/Server/Mail/Data/spool/maildrop $ sudo chmod 777 /Library/Server/Mail/Data/spool/maildrop
- I chose to set up gmail as my email relay (this may not be required for you though)
http://realityloop.com/blog/2011/06/05/os-x-ditching-mamp-pro-part-2-gmail-email-relay - Mountain Lion appears to have a few bugs around this at the moment, I have to launch postfix on reboot
$ sudo postfix start
- Make nginx log files visible in Console app
$ sudo mkdir /var/log/nginx
- Create the following directorty to stop “"/var/lib/nginx/speed" failed (2: No such file or directory)” error
$ sudo mkdir /var/lib/nginx
- Run 'brew link libevent', if it errors about destination already existing, delete that file and try again
$ brew link libevent
- If you get the following back
Linking /usr/local/Cellar/libevent/2.0.19... Error: Could not symlink file: /usr/local/Cellar/libevent/2.0.19/include/evutil.h Target /usr/local/include/evutil.h already exists. You may need to delete it.
- Then delete the target file and rerun
$ rm /usr/local/include/evutil.h /usr/local/include/event.h
- Then link libevent again
$ brew link libevent





