Virtualize Raspberry Pi (i.e. ARM) on OS X using QEMU

Here’s how:

  • Install and upgrade Xcode to 4.3 or above.
  • Install the Xcode Command Line Tools (you can do this from within Xcode’s “Downloads” preference pane).
  • Install Homebrew, using the instructions here – http://brew.sh/
  • Force Homebrew to install version 1.1.0 of QEMU
    git checkout 2b7b4b3 Library/Formula/qemu.rb

Sources:

Advertisements

Activating the bundled PHP server on Mac OS X (Snow Leopard)

Here is what I did on OS X 10.6.2, assuming that you already have bundled Apache web-server running – if not do this: Apple menu > System Preferences and click Sharing. Select the Web Sharing checkbox.)

1. Open up a terminal window and execute:

sudo nano /private/etc/apache2/httpd.conf

2. Uncomment – the line:

LoadModule php5_module libexec/apache2/<a href="http://libphp5.so" target="_blank">libphp5.so</a>

3. Add the following to handle php files:

<IfModule mod_php5.c>
# If php is turned on, we respect .php and .phps files.
AddType application/x-httpd-php .phpAddType application/x-httpd-php-source .phps
# Since most users will want index.php to work we
# also automatically enable index.php
<IfModule mod_dir.c>
DirectoryIndex index.html index.php
</IfModule>
</IfModule>

4. Restart the web-server:

sudo apachectl graceful

5. My root folder for my webserver is: /Library/WebServer/Documents. Create a PHP test file (e.g. phptest.php) which contains one line:

<?php phpinfo(); ?>

6. Test PHP http://localhost/phptest.php