Now that I have my cool Mac Mini running, it is time to get some stuff up and hosted on it. I decded to host this blog and the photogallery on the mini. Sounds simple enough right? I mean, I already have the WordPress blog configured, and the gallery is also configured and working correctly…
Apache
The first goal was to get Apache running and serving up pages. I was previously running Apache 2.x and have never worked with Apache 1.3. In looking over the system, I quickly realized that Apache is installed on a OS X machine, and it is version 1.33 (if you have all the latest Tiger updates). Checking the web, I realize that 1.33 is pretty current, so I go with it. I take a peek at the httpd.conf and see many similarities to 2.x. I configure the necessary settings to enable PHP. A few mintues later Apache’s default page is served up on my other machines. So far so goood!
MySQL
Next, I venture over to MySQL’s wesite and found this information. From the chart, I see that I should download 4.1.10a for Tiger 10.4. I go to the download page and click on the 4.1 section and find that The version available to download is 4.1.13. I download the package and get it all installed. I also downloaded the MyQLAdmin tool so that I can use a GUI tool to do some admin stuff.
At this stage I decide to do a backup on my Ubuntu machine. I backed up the old wordpress database to a file. I then copied the backup over to the Mac Mini, in preparation to restore it to the new database. That all sounds goood conceptually. But I quickly realize that running a restore is not creating a new schema even though I have the check box checked. After trying a few different things (that made no difference), I decided on a new plan. The new plan was to install WordPress fresh and figure out how to get the data restored later.
I downloaded the WordPress package, and got it situated on the hard drive where I wanted it, and I updated Apache to look in the new directory. I also used the VirtualHost directive since I will be hosting 2 different sites on the mini. I started walking through the WordPress 5 mintue install script, and after I modified the config file to have the correct database connection information, I gave it a try. I instantly received an error page that said it is unable to connect to the database. At this stage I take a moment to reflect on what i have configured, and proceed to check over alll the settings. Not finding anything abnormal, I decide to create a different user in MySQL and assign more permissions, choose a simpler password, and change a few other settings. No matter what I did, I couldn’t seeem to get WordPress to connect to the database. I verify settings another 10 times with MySqlAdmin and even log in with the database credentials via MySQLAdmin correctly, but WordPress refuses to connect.
I take a moment to regroup and I perform some queries in Google. I quickly come across another person’s blog where they mention in passing that there is a compatibity issue with WordPress and MySQL 4.1. MySQL 4.0 works correctly, but the new security settings in 4.1 cause the issue. Huh?? Once I have this information, I quickly discover that this is a common issue, and that there is a workaround. The workaround is to modify the my.cnf file and add the single line:
old-passwords
I restarted Apache, and MySQL for good measure. Would you know that a few more clicks through the WordPress wizard and I now have a working blog, although lacking my blog data.
Now, I return my attention to restoring the backup that I made on the Ubuntu machine. I have done a lot of SQL Server 2000 backups and restores and have an idea how it *SHOULD* work. I attempt to restore again and notice that WordPress is not picking up the restored data. In one of the many attempts to get this restored, I notice that there is a check box in MySQLAdmin that says “ignore SQL errors”. Do I want to ignore errors? Let’s give it a whirl. Now the restore takes a bit longer, and then …. My data is back! I give the blog pages a once over and notice that some things were missing. Like the blog title, any blog categories I had previously setup and default the blogroll was still present without my personal links I created. I easily created the new categories, and assigned the blogs to the new categories. Lastly, I created the link to the photoalbum and all was complete. After all this, my blog was now officially hosted on the mac mini. On to the Gallery!
Gallery
Whoa! It is getting late. I mean early! I have a feeling of acomplishment that I got the blog moved, and I was at that point where I could have easily went to bed and worked on the gallery another night. I thought to myself, the gallery is “self contained” in a directory and no database connectvity to contend with… This should go quicker. Famous last words. I connected to my Ubuntu machine and copied over all the data. I configured Apache for another VirtuaHost and attempted to connect. Nothing. Seems that directory permissions were way wrong. Once I got that all straightened out, I attempted to load the page again. I got some interesting errors. Colorful and all
The errors were indicating it couldn’t create some information in a path that it is not installed to, and doesn’t exist. It was icking up the old location it was installed to on the Ubuntu machine. When I copied the data from the Ubuntu machine to the Mac Mini, I changed the location on the drive. Gallery doesn’t like this. I modified the config files and found all the places that needed to be updated. Once I figured that out, the photoalbum was served up nicely. All done? Of course not! I recalled that my wife wanted some new pictures to be uploaded. I thought “Hey, since I am here and it’s working great, let’s see how the mac does importing the pics.” That is when I figured out that OS X is missing some jpeg manipulation packages. To make a long search story short, I ended up finding the jpeg packages that would work. It wasn’t straight forward, and it appeared that one of the main sites that hosted the packages was down for maintenace or something. I found them elsewhere, and got it working. Now that it is working, I did a quick performance test and found that the Mac Mini is lacking a bit of horse power. The mini works great for a lot of tasks, but when it comes to crunching pictures, it took substantially longer than my Ubuntu machine. The Ubuntu box is a P4 2.4 Ghz with SATA drives, so it should be faster. I was just hopeful that somehow those guys at Apple figured out how to magically obtain better performance out of slower hardware. Not so, but it is plenty fast for most any task, even serving up a blog and picture gallery