<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>TomatoCheese Blog</title>
    <link>http://blog.tomatocheese.com</link>
    <language>en</language>
    <webMaster>usually@tomatocheese.com (Joannou Ng)</webMaster>
    <copyright>Copyright 2007-2008</copyright>
    <ttl>60</ttl>
    <pubDate>Thu, 01 Nov 2007 15:10:54 GMT</pubDate>
    <description></description>
    <item>
      <title>Migrating MySQL 5.0.45 to Mac OS X 10.5 Leopard</title>
      <link>http://blog.tomatocheese.com/archives/2007/11/1/migrating_mysql_to_mac_os_x_leopard/</link>
      <pubDate>Thu, 01 Nov 2007 14:59:00 GMT</pubDate>
      <guid>http://blog.tomatocheese.com/archives/2007/11/1/migrating_mysql_to_mac_os_x_leopard/</guid>
      <author>usually@tomatocheese.com (Joannou Ng)</author>
      <description>&lt;p&gt;If you Archive and Installed Leopard, and installed MySQL 5.0.45 on your previous OS X using the official MySQL package, then the following will migrate your MySQL to Leopard.&lt;/p&gt;

&lt;p&gt;Copy your MySQL over:&lt;br/&gt;
&lt;code&gt;sudo cp -pR /Previous\ Systems.localized/&lt;/code&gt;&lt;strong&gt;datetime_you_installed_leopard&lt;/strong&gt;&lt;code&gt;/usr/local/mysql-5.0.45-osx&lt;/code&gt;&lt;strong&gt;your_previous_os_x_version&lt;/strong&gt;&lt;code&gt;-&lt;/code&gt;&lt;strong&gt;your_architecture&lt;/strong&gt; &lt;code&gt;/usr/local/mysql-5.0.45-osx&lt;/code&gt;&lt;strong&gt;your_previous_os_x_version&lt;/strong&gt;&lt;code&gt;-&lt;/code&gt;&lt;strong&gt;your_architecture&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Copy your MySQL symlink over too:&lt;br/&gt;
&lt;code&gt;sudo cp -pR /Previous\ Systems.localized/&lt;/code&gt;&lt;strong&gt;datetime_you_installed_leopard&lt;/strong&gt;&lt;code&gt;/usr/local/mysql /usr/local/mysql&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Remove the MySQL startup item (we&amp;#8217;ll use the preferred launchd instead):&lt;br/&gt;
&lt;code&gt;sudo rm -R /Library/StartupItems/MYSQLCOM&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Also, right-click and remove the MySQL preference pane in System Preferences because we&amp;#8217;ll be using the preferred launchd instead.&lt;/p&gt;

&lt;p&gt;Copy &lt;a href="http://tomatocheese.com/library/com.mysql.mysqld.plist"&gt;this MySQL launchd configuration file&lt;/a&gt; to /Library/LaunchDaemons, and change its owner to root:&lt;br/&gt;
&lt;code&gt;sudo chown root /Library/LaunchDaemons/com.mysql.mysqld.plist&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Change your MySQL owner to mysql:&lt;br/&gt;
&lt;code&gt;sudo chown -R mysql /usr/local/mysql-5.0.45-osx&lt;/code&gt;&lt;strong&gt;your_previous_os_x_version&lt;/strong&gt;&lt;code&gt;-&lt;/code&gt;&lt;strong&gt;your_architecture&lt;/strong&gt; &lt;code&gt;/usr/local/mysql&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Load the MySQL launchd configuration file:&lt;br/&gt;
&lt;code&gt;sudo launchctl load /Library/LaunchDaemons/com.mysql.mysqld.plist&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Got MySQL?&lt;/p&gt;</description>
      <category domain="http://blog.tomatocheese.com/archives/tags/apple">apple</category>
      <category domain="http://blog.tomatocheese.com/archives/tags/launchd">launchd</category>
      <category domain="http://blog.tomatocheese.com/archives/tags/leopard">leopard</category>
      <category domain="http://blog.tomatocheese.com/archives/tags/macosx">macosx</category>
      <category domain="http://blog.tomatocheese.com/archives/tags/mysql">mysql</category>
    </item>
    <item>
      <title>Installing Apache 2.2.4 with PHP 5.2.2 on Mac OS X 10.4.10</title>
      <link>http://blog.tomatocheese.com/archives/2007/7/16/installing_apache_with_php_on_mac_os_x/</link>
      <pubDate>Sun, 15 Jul 2007 22:05:00 GMT</pubDate>
      <guid>http://blog.tomatocheese.com/archives/2007/7/16/installing_apache_with_php_on_mac_os_x/</guid>
      <author>usually@tomatocheese.com (Joannou Ng)</author>
      <description>&lt;p&gt;&lt;strong&gt;Install Apache&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Download and install Xcode Tools 2.4.1:&lt;br/&gt;
&lt;a href="http://connect.apple.com/"&gt;http://connect.apple.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Download and unarchive Apache 2.2.4:&lt;br/&gt;
&lt;a href="http://httpd.apache.org/download.cgi"&gt;http://httpd.apache.org/download.cgi&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cd httpd-2.2.4&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Configure Apache for Mac OS X, with all modules built as Dynamic Shared Objects, and use the bundled Apache Portable Runtime at build time:&lt;br/&gt;
&lt;code&gt;./configure --enable-mods-shared=all --with-included-apr&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Build Apache Universal Binaries (to integrate with Marc Liyanage&amp;#8217;s PHP module):&lt;br/&gt;
&lt;code&gt;CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386" LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386" make&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Install Apache:&lt;br/&gt;
&lt;code&gt;sudo make install&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Configure Apache (Optional)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Edit the DocumentRoot and the corresponding Directory (in the Apache configuration file: /usr/local/apache2/conf/httpd.conf) to a friendlier folder:&lt;br/&gt;
&lt;code&gt;DocumentRoot "/Users/your_os_x_short_name/Sites"&lt;br/&gt;
&amp;lt;Directory "/Users/your_os_x_short_name/Sites"&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Test Apache&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Stop Personal Web Sharing (if started)&lt;/p&gt;

&lt;p&gt;Start Apache:&lt;br/&gt;
&lt;code&gt;sudo /usr/local/apache2/bin/httpd -k start&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Does it work?&lt;br/&gt;
&lt;a href="http://0.0.0.0/"&gt;http://0.0.0.0/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install PHP&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Download, unarchive, and install Marc Liyanage&amp;#8217;s PHP 5.2.2 for Apache 2:&lt;br/&gt;
&lt;a href="http://www.entropy.ch/software/macosx/php/"&gt;http://www.entropy.ch/software/macosx/php/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ignore the &amp;#8220;There were errors installing the software&amp;#8221; message in Installer. That is because the PHP package&amp;#8217;s postflight script failed to load the new PHP module into the old Apache by running the default apachectl.&lt;/p&gt;

&lt;p&gt;Add the following line to the end of the new Apache configuration file, to load the new PHP module:&lt;br/&gt;
&lt;code&gt;Include /usr/local/php5/entropy-php.conf&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Test PHP&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Restart Apache:&lt;br/&gt;
&lt;code&gt;sudo /usr/local/apache2/bin/httpd -k restart&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Create a phpinfo.php file in your Sites folder, with the following line:&lt;br/&gt;
&lt;code&gt;&amp;lt;?php phpinfo() ?&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Got PHP?&lt;br/&gt;
&lt;a href="http://0.0.0.0/phpinfo.php"&gt;http://0.0.0.0/phpinfo.php&lt;/a&gt;&lt;/p&gt;</description>
      <category domain="http://blog.tomatocheese.com/archives/tags/apache">apache</category>
      <category domain="http://blog.tomatocheese.com/archives/tags/apple">apple</category>
      <category domain="http://blog.tomatocheese.com/archives/tags/macosx">macosx</category>
      <category domain="http://blog.tomatocheese.com/archives/tags/php">php</category>
    </item>
  </channel>
</rss>
