Installation on Mac OS X 10.5.5

I did manage to get Omeka running on my Mac. OS X 10.5.5 has Apache automatically installed and running but PHP is not enabled nor is it configured correctly for mod_rewrite. In addition, Apple has its own location for most of the configuration files. If Apache is not running use System Preferences / Sharing and click the checkbox next to Web Sharing.

Here are the steps I followed:

1. Modify Apache httpd.conf

Open a terminal:

cd /private/etc/apache2
sudo vi httpd.conf

(Of course you can use any text editor you like. I just use vi because it's handy.)

Find and uncomment (delete the # at the beginning) the line loading PHP.

#LoadModule php5_module libexec/apache2/libphp5.so
becomes
LoadModule php5_module libexec/apache2/libphp5.so

Find and change the "None" to "All" for the line

AllowOverride None
becomes
AllowOverride All

Save the file.

Restart Apache2 with:

sudo apachectl restart

2. Setup Omeka

On Macs with OS X 10.5.5 the default directory for Apache2 is `/Library/WebServer/Documents'.

Install the Omeka unzipped files here. I created a directory for the name of my project and put the Omeka files in that directory.

3. Install MySQL on the Mac.

Get the install from http://dev.mysql.com/downloads/mysql/5.0.html

4. Setup Omeka account in MySQL

Just as the install instructions for Omeka suggests. Don't forget to modify db.ini file to point to the Omeka database you just created.

5. Find mysql.sock

mysql.sock is not in the same place as on a Linux server so we need to create a link for it. First make the directory where Omeka expects to find mysql.sock.

sudo mkdir /var/mysql

This is where Omeka expects to find mysql.sock. But on Macs mysql.sock is in /private/tmp/mysql.sock. So I just created a link:

sudo ln -s /private/tmp/mysql.sock /var/mysql/mysql.sock

6. Install Imagemagick

Follow the instructions at http://www.imagemagick.org/script/binary-releases.php

You should now be able to go to http://localhost/omeka_directory_for_your_site and start to create your site.

Additional configuration needs to be done to make the ImageMagick installation work. As far as I can tell if you use the down loadable binaries for ImageMagick referenced above, the executable files expect to find the ImageMagick libraries at /ImageMagick-6.4.4/lib, that is, in the root directory. So if you didn't install ImageMagick in the root directory, you need to copy the directory structure to /.

If you don't want to move the files, you need to recompile ImageMagick from source, then the executable files will all point to the correct location.

What I did was to execute the following command to move Imagemagick to / :

sudo cp -r /Users/username/Applications/ImageMagick-6.4.4 /

Another step needs to be taken as well. I also found in a post from two months ago http://omeka.org/forums/topic/imagemagick-fink-mac-os-x-etc?replies=8#post-596
that you need to make the change to application/models/File.php that is suggested in this post.

Line 347 should have the '. -version' removed from it.

Finally, in Settings, the Path to Convert field should be /ImageMagick-6.4.4/bin/convert or wherever you compiled ImageMagick to if you chose the new compile option.

After these changes, Omeka and ImageMagick worked fine together on Mac OS X 10.5.5.

I was able to setup Omeka with ImageMagick in about 30 minutes. Here's how I did it.

Step 1:
Download, Install, and Unzip Omeka. You can pretty much place the Omeka directory wherever but in efforts to keep things organized, I placed it in my Sites directory ( aka ~/Sites or /Users/chrisaiv/Sites)

Step 2:
Download and install Marc Liyanage ImageMagic package for Mac OSX. The version of ImageMagic is a bit old but it seems to work for me and I'm using Leopard 5.5.
http://www2.entropy.ch/download/imagemagick-6.1.7.pkg.tar.gz.

Step 3:
Download and Setup MAMP. What is MAMP? It's basically an application that already has PHP5, MySQL 5, and phpMyAdmin ready to go. If you are familiar with Ruby on Rails, it's sorta like Locomotive but for the PHP world. http://www.mamp.info/en/download.html

After opening the MAMP application, go to:

A. Preferences > Ports and click "Set to default Apache and MySQL ports"

B. Preferences > Apache and click "Select...". From there point to your ~/Sites/Omeka directory

C. Start the MAMP Servers

D. Finally, within the MAMP Application, click "Open start page". It should open a browser and present a "Welcome Screen". Look for the Main Navigation and click on "phpMyAdmin". Within phpMyAdmin, look for "Create new database" and inter a name for your Omeka database. After clicking "Create". Return to ~/Sites/Omeka/db.ini and enter

name = "name_of_database"

Things to remember:
MAMP already does a lot of the configuration work for you. After starting up your servers in MAMP, use these configurations to setup ~/Sites/Omeka/db.ini

host = "localhost"
username = "root"
password = "root"
name = "name_of_database"
prefix = "omeka_"
;port = "3306"

Step 4:
Return to your browser and with MAMP turned on, type http://localhost. That should take you to the Omeka Setup/Installation page. When the installation asks you "Path To Convert" enter "/usr/local/bin/convert".

If you'd like to double check as to where "convert" is located on your system. Open up /Applications/Utilities/Terminal and type "which convert". If convert has been installed, it should return a path.

I'm still having trouble with ImageMagick, I followed the steps in the first post, and everything except ImageMagick is running. I have ImageMagick installed and running on the command line but Omeka is still telling me it is configured incorrectly. I've tried moving my ImageMagick install to the root directory among other places and no matter where it is I can't seem to get Omeka to recognize it.

Also I must have a newer version of Omeka as there is no line 347 containing '. -version'. Any help would be greatly appreciated.
Thanks,
-Winona

To clarify, you've typed "which convert" in the command line, and then pasted that path into Omeka and it still doesn't work? What was the path?

This is the path: /opt/local/bin/convert

I installed ImageMagick with MacPorts.

Thanks.

You can fix this by changing the return value of File::checkForImageRecord. In 0.10 you can change line 329 of application/models/File.php from:

return($convert_return == 0);

to

return($convert_return == 1);

ImageMagick installed from MacPorts returns 1 instead of 0 when installed correctly. This is addressed in the class comments, so someone must be aware of the problem.

Yeah, we're working on fixing this. We also need to fix the class comments that you mentioned. I think the problem is that newer versions of ImageMagick return an error status (1) when running the script w/o arguments. It should return 0 if you run it with a -version argument. If you could try that and let me know the results, we may be able to incorporate the fix into the upcoming release. Thanks!

ImageMagick has me beat. I'm running a clean install of Snow Leopard and can't get IM to install correctly. Is there any work around, or do I need to suffer through the ImageMagick badness?

Hi lhermley,

Unfortunately I can't offer much assistance with Snow Leopard and Image Magick. I haven't upgraded to Snow Leopard yet. Snow Leopard does come with PHP 5.3, so there might be some compatibility issues with ImageMagick and the new version of PHP.

After a bit of reading, it looks like MacPorts has a new port of ImageMagick -- php5-imagemagick -- that seems to have helped some people running Snow Leopard. If you use MacPorts, there may be someone in their community that could offer more direction.

This guy seems to have installed in on Snow Leopard:

http://jaredonline.posterous.com/installing-imagemagick-on-snowleopard-106

Some of the comments might also be useful for debugging.

Sorry I couldn't help more, but do let us know if you get it working!

Best,
Jeremy

I just managed to install ImageMagick using macports, but am having the same trouble with Omeka not recognizing it. I did which convert and pasted in the path, but it still fails. Any advice? Thanks.

Did you paste in the path sans 'convert'? Omeka uses the directory path leading to that particular binary, so if you got '/usr/bin/convert' from which convert, you would paste '/usr/bin' into the settings panel.

One easy workaround is to install a linux server-based instance of Omeka in a virtual machine (using e.g. VirtualBox or VMWare Fusion) with bridged networking. That puts the VM on the same subnet as the Mac host. All work would be completed in the Mac host's browser, and the virtual machine can be started and stopped as needed. If the Mac is on a public network, the VM's IP address will be exposed; otherwise you can forward port 80 traffic to the VM's IP address from the router/firewall and reach it from the other side of the router using the router's IP address.

Just a thought.

Just a note on this, I installed on OS X 10.6.8 with MAMP and the latest MacPort of ImageMagick: once I changed back to PHP 5.2.17 in MAMP preferences the install went fine.