[ome-users] Omero.web on a macX server

Alex Sossick ajs17 at cam.ac.uk
Tue Jun 16 10:13:53 BST 2009


Hi Stephen

One of the IT people suggested this as a solution  to make the Xserve apache
run in 32 bit, (he found it on google) It means that if ICE ever becomes
64bit, its a quick swap for apache back to 64bit.

The web interface, ldap and imageJ all are now working well

Alex

--==--

This method will make a copy of the Apache binary and ensure that apachectl
(and hence, the normal OS config) will properly start the 32-bit version:
First, create the 32-bit version of httpd:
sudo lipo -thin i386 /usr/sbin/httpd -output /usr/sbin/httpd.i386

Second, edit the system configuration so it uses the new version instead of
the default. Change "/usr/sbin/httpd" to "/usr/sbin/httpd.i386":
sudo vi /System/Library/LaunchDaemons/org.apache.httpd.plist
Lastly, restart Apache:
sudo apachectl restart

--==--
Stephen Ogg at stephen.ogg at imb.a-star.edu.sg wrote on 16/6/09 2:25:

> Hi Alex -
> 
> I had the same problem on my Xserve with the 64 bit server vs 32 bit
> mod_python and ICE libraries. I could recompile mod_python to be 64
> bit compatible, but then ran into the same problem you did, where ICE
> is only 32 bit. The solution would really be to have a 64 bit ICE, but
> I don't have the skills to make sure that would work with all the
> downstream omero stuff.
> In the end, I configured the apache webserver to run in 32 bit mode.
> Here's how I did it - warning: this may screw up your install so make
> sure you make backups, etc. Also, as a further disclaimer, I'm only a
> biologist, so anything I tell you regarding computer system
> administration may be wrong. There may be better ways of doing what I
> did, but here's what worked for me:
> 
> On my Xserve running OS X 10.5.7, the webserver application is a fat
> binary file called "httpd" and is in "/usr/sbin". If I run the "file"
> command on this binary, I get the following results:
> 
> sekudu:sbin administrator$ file httpd
> httpd: Mach-O universal binary with 4 architectures
> httpd (for architecture ppc7400): Mach-O executable ppc
> httpd (for architecture ppc64): Mach-O 64-bit executable ppc64
> httpd (for architecture i386): Mach-O executable i386
> httpd (for architecture x86_64): Mach-O 64-bit executable x86_64
> 
> The trick is to (after making a backup) remove the 64 bit
> architectures from the binary, that way, it's forced to run as a 32
> bit application. To do this you need the "lipo" command
> 
> lipo httpd -remove x86_64 -output httpd
> lipo httpd -remove ppc64 -output httpd
> 
> Those commands remove the 64 bit executables from the fat binary,
> rename it as "httpd"  and you're left with the following:
> 
> 
> sekudu:sbin administrator$ file httpd
> httpd: Mach-O universal binary with 2 architectures
> httpd (for architecture ppc7400): Mach-O executable ppc
> httpd (for architecture i386): Mach-O executable i386
> 
> restarting the machine then restarts apache2 as a 32 bit application.
> Of course the downside is that it's now running in 32 bit mode rather
> than 64 bit. Plus, everytime you update your system software, if Apple
> has updated the apache2, your "httpd" will be replaced with a brand
> new copy from Apple that will have the 64 bit architectures in the fat
> binary -requiring you to remove them again.
> 
> The real solution would be to make sure everything the omero needs is
> 64 bit compatible.
> 
> Hope that this is helpful to you and anyone else trying to run omero
> on OS X server with 64 bit architecture machine.
> 
> Steve
> 
> Stephen Ogg
> Institute of Medical Biology
> 8A Biomedical Grove
> Singapore 138648
> 
> stephen.ogg at imb.a-star.edu.sg
> 
> 
> 
> 
> On 15 Jun 2009, at 18:45, Alex Sossick wrote:
> 
>> Dear All
>> 
>> Does anyone have any helpful suggestions installing omero.web on a mac
>> Xserver. 10.5.7 I have hit a wall, basically ICE is a 32bit app, and
>> the web
>> server server on the Mac Xserver is a 64 bit app.
>> 
>> I have a solution in that I can install apache and mod_python using
>> mac
>> ports and not use the apple installed webserver, though I would
>> rather use
>> the apple installed webserver if possible.
>> 
>> Below is what I have done so far
>> 
>> Thanks
>> 
>> Alex
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> So far I have worked out that to use the Web server installed on the
>> Xserve
>> you need to down load and install the very latest mod_python,
>> 
>> https://svn.apache.org/repos/asf/quetzalcoatl/mod_python/
>> 
>> In the httpd.conf file when you add the Location info, you also need
>> to add
>> to the PythonPath where python is,
>> 
>> PythonPath
>> /opt/Ice-3.3/python'
>> 
>> <Location "/">
>>    SetHandler python-program
>>    PythonHandler django.core.handlers.modpython
>>    SetEnv DJANGO_SETTINGS_MODULE omeroweb.settings
>>    PythonDebug On
>> 
>>    PythonPath "['/usr/share/omero/omero_dist/lib/python/',
>> '/usr/share/omero/omero_dist/lib/python/omeroweb', '/opt/Ice-3.3/
>> python'] +
>> sys.path"
>> 
>> </Location>
>> 
>> 
>> -- 
>> Alex Sossick
>> Wellcome Trust/Cancer Research UK Gurdon Institute
>> University of Cambridge
>> Tennis Court Rd
>> Cambridge CB2 1QN
>> UK
>> 
>> email ajs17 at cam.ac.uk
>> tel 01223 334082
>> 
>> 
>> _______________________________________________
>> ome-users mailing list
>> ome-users at lists.openmicroscopy.org.uk
>> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
> 
> 
> 
> 
> 
> 

-- 
Alex Sossick
Wellcome Trust/Cancer Research UK Gurdon Institute
University of Cambridge
Tennis Court Rd
Cambridge CB2 1QN
UK

email ajs17 at cam.ac.uk
tel 01223 334082





More information about the ome-users mailing list