cancel
Showing results for 
Search instead for 
Did you mean: 

Has anyone tried installing on OS X?

janiner
Champ in-the-making
Champ in-the-making
Are there any known reasons why this wouldn't work?  The "Product Datasheet" linked to from the home page says that OS X is supported, but it also says that Oracle is supported and as far as I can tell that's not true yet.  So perhaps the datasheet is describing the end goal and not the current state of things?  Everywhere else on the site I see only Linux and Windows support mentioned.

I have OS X 10.4, which comes with Java version 1.4.2_07.  Java 5.0/1.5 is available from Apple but it does not replace 1.4.2, and I read on someone's blog that an application has to explicitly request version 1.5 in order for it to be used.  So will Alfresco do that or am I just asking for trouble here?

thanks,

janine
20 REPLIES 20

paulhh
Champ in-the-making
Champ in-the-making
Here's a draft of the readme for OS X on Tomcat and the scripts it mentions - any feedback most gratefully received!

Cheers
Paul
—————————————

========================
Alfresco Preview Release
========================

Welcome to the Alfresco Preview Release.  This is provided as a
snapshot of where we are currently in the development of the Alfresco
system.  It is intended for preview use only and should not be used for
any other purpose.  Not all functionality is available or complete.


===================================
Installing Alfresco Preview Release
===================================

The Alfresco Preview Release is intended for evaluation purposes only.


====================================
Alfresco Tomcat Bundled Installation
====================================

Requirements:
- Mac OS X 10.4 or above
- Java Development Kit available from http://www.apple.com
- MySQL Database available from http://www.mysql.com
- Alfresco available from http://www.alfresco.org

Optional:
- OpenOffice for document transformation available from http://www.openoffice.org


===========================
Simple Installation on OS X
===========================

All these instructions assume knowledge of using OS X from Terminal commands.  You
may need to prefix some of the commands with 'sudo' if you do not have administrative
access.



Install JDK 5.0
—————

- If you already have J2SE Development Kit 5.0 installed, skip to "Install MySQL"

- Browse to http://www.apple.com/support/downloads/java2se50release1.html
- Install once downloaded


Install MySQL
————-

- If you already have MySQL 4.1 installed, skip to "Create Database"

- Browse to http://dev.mysql.com/downloads/mysql/4.1.html
- Download the approprate MySQL Max for your platform
- Install by following MySQL's installation instructions
  (for ease, we recommend installing the included StartupItem package too)


Create Database
—————

Then create a database schema named 'alfresco', e.g.:
   mysqladmin -u root create database alfresco
   (you may need to 'cd /usr/local/mysql/bin' to execute these commands)

Then create a new user with full rights on this database, e.g.:
   mysql -u root -e "grant all on alfresco.* to 'alfresco'@'localhost' identified by 'alfresco' with grant option;"

To check that this is working correctly, start MySQL and connect to the database:
   mysql -u alfresco -p
   mysql> use alfresco;
   Database changed
   mysql> quit


Install Alfresco Tomcat Bundle
——————————

- Browse to http://www.alfresco.org/downloads
- Download the "Alfresco Linux Tomcat Bundle" option
- Create a directory in your home named 'alfresco'
- Uncompress alfresco-tomcat-xxxxxx.tar.gz in the '~/alfresco' directory
- Edit 'alf_start_tc_osx.sh' and 'alf_stop_tc_osx.sh' and set the correct location for JAVA_HOME

You have now installed all the components needed to run the Alfresco server.


Optional Install of OpenOffice
——————————

If you would like to have a range of document transformations available from within
Alfresco, you need to install OpenOffice 1.1.4.  This is entirely optional and can be
done at any point after Alfresco has been installed. 

- Browse to http://download.openoffice.org/1.1.4/index.html
- Download the OS X version (currently NeoOffice/J release)
- Install OpenOffice
- Start one of the OpenOffice programs to go through initial registration, then close it
- Edit '~/alfresco/start_oo.sh' and set the correct location for OpenOffice
- Stop and restart the Alfresco server if it is already running


===========================
Running the Alfresco Server
===========================

Ensure that the MySQL server is running, then navigate to the '~/alfresco' directory
- Run 'sudo alf_start_tc_osx.sh' to start Tomcat as superuser
- If you wish to use OpenOffice document transformations, run '../start_oo.sh'
- You can now try Alfresco by visiting:

http://localhost:8080/alfresco

The server is configured with a single administrative login with user name and password
both set to 'admin'.

To test the installation, you may wish to follow the tutorial, available from:

http://www.alfresco.org/downloads or from the company space from within the Web Client.


===========================
Closing the Alfresco Server
===========================

Navigate to the '~/alfresco' folder and run 'sudo alf_stop_tc_osx.sh'
If you started OpenOffice as above, then also run 'stop_oo.sh'


=====================
Using the CIFS Server
=====================

The Preview release with CIFS is configured for ease of deployment.
Once the Alfresco server is running, it should be possible to connect to it by mapping a
drive to it.  The name to use for the mapping is based on the name of the server on which
Alfresco is running, with '_A' on the end.  For example, if the PC name is 'MYPC01', then
the CIFS server name will be 'MYPC01_A'.  To map the drive on a MS Windows client, open Windows Explorer, go
to the Tools menu and select 'Map Network Drive…'.  In the Map Network Drive dialog,
choose the drive letter you wish to use.  To locate the CIFS server, click the 'Browse…'
button and find the server name as described above.  You should then have the option to
select a folder within it called 'alfresco'.  Click 'OK' to select the folder, then click
'Finish' to map the drive.  You should now have access to the Alfresco repository from
the mapped drive.  If the CIFS server name does not show in the browse dialog, you may also
enter the folder location directly in the dialog, for example '\\MYPC01_A\alfresco'.

You may mount the repository on a Mac client using a Network connection of the form
smb://MYPC01_A/alfresco'.

To check the CIFS server is running, try connecting from the Alfresco server using smbclient.

If you are unable to connect to the CIFS server, then depending on your network, you may need
to configure the domain for CIFS to use.  You will need to have started the Alfresco server
at least once to be able to do this.  To set the domain, edit the 'file-servers.xml'
file in the '~/alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco' directory and add the
domain into the following line:
   <host name="${localname}_A"/>
so that it is something like:
   <host name="${localname}_A" domain="MYDOMAIN"/>

You will need to restart the Alfresco server for this to take effect.


================
Trouble-Shooting
================

If you have problems with your installation, please look for help on the Installation
forum at http://www.alfresco.org/forums and ask for any additional help you may need.

. The JAVA_HOME variable must be set correctly to your Java5 installation.

. Most installation issues can be resolved by following advice in this forum article:
- http://www.alfresco.org/forums/viewtopic.php?t=7
  and in this forum generally:
- http://www.alfresco.org/forums/viewforum.php?f=8

. WAR file name is now called alfresco.war
NOTE: If you deployed the war previously from source (rather than use a standard Alfresco installation package) then you must clear out the web-client stuff from your appservers before deploying the new WAR file:

Tomcat:
- Delete <tomcat-home>/webapps/web-client.war
- Delete <tomcat-home>/webapps/web-client
- Delete <tomcat-home>/work

JBoss:
- Delete <jboss-home>/server/default/deploy/web-client.war

. If the following errors are reported on the console:
ERROR [AbstractImageMagickContentTransformer] JMagickContentTransformer not available:
ERROR [AbstractImageMagickContentTransformer] ImageMagickContentTransformer not available: Failed to execute command: imconvert …
  These are not issues which will cause the server to fail, Alfresco is reporting the fact that various external document transformation engines are not available for use by the server. Either follow the instructions at the bottom of the Release Notes Wiki page:
- http://www.alfresco.org/mediawiki/index.php/Preview_Release_5
  or remove the transformer references completely if you don't require them:
- http://www.alfresco.org/forums/viewtopic.php?t=90

. If you see this error on server startup:
ERROR [protocol] FTP Socket error
    java.net.BindException: Address already in use: JVM_Bind
         at java.net.PlainSocketImpl.socketBind(Native Method)
Check to see if you have any services running against port 8080 for the Alfresco server and port 21 for the Alfresco FTP integration.

——————————————
alf_start_tc_osx.sh:
——————————————
#!/bin/sh
export CATALINA_HOME=~/alfresco/tomcat
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home
export PATH=$JAVA_HOME/bin:$PATH
$CATALINA_HOME/bin/startup.sh

——————————————
alf_stop_tc_osx.sh:
——————————————
#!/bin/sh
export CATALINA_HOME=~/alfresco/tomcat
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home
export PATH=$JAVA_HOME/bin:$PATH
$CATALINA_HOME/bin/shutdown.sh

mactroll
Champ in-the-making
Champ in-the-making
First of all, thanks for all of the work on this.

I got this up and running on OS X 10.4 Server in about 15 mins. start to finish. A few quick thoughts about the configuration:

1. Since this really isn't a user space app, it's probably best to stick it all in /opt/alfresco and run it from there. Makes it easier to hard code the path in the startup scripts and have the whole thing run as root.

If there's interest I'd be happy to post the quick launchd items to allow this to auto start on boot on OS X client or server.

2. I had to set the domain and remove the platform attributes from file-servers.xml to get the SMB server fully working.

In my testing with this, large file transfers would work well, unless they had a rule to transform them on upload, ie pdf -> text, which would cause the SMB connection to fail. Doing the same actions from within the webtop worked fine.

Besides those few things, everything has been working quite well.

I'm anxiously awaiting LDAP authentication options, and the WebDAV services.

Please let me know if you need a hand with the OS X specific things, as I would be more than happy to help.

paulhh
Champ in-the-making
Champ in-the-making
Hi

Thanks for the feedback.  Any advice on the right place to put stuff for OS X and auto start would be great - none of us are familiar with OS X.

We'll have support for OS X as a platform in file-servers.xml, so that should be easier to configure in the future.

What size pdf were you using in your tests?

WebDAV is nearing completion, LDAP will be through Acegi.

Cheers
Paul

janiner
Champ in-the-making
Champ in-the-making
I just finished doing an install of RC1 on OS X Server 10.4.  It was hard fought, but not Alfresco's fault.

I tried both the JBoss and Tomcat versions but both were barfing with a "Connection Refused" from MySQL.  The problem turned out to be that it was being run with the –skip-networking command line switch.  Getting rid of it requires running "/Applications/Servers/MySQL Manager" and checking the "Allow network connections" box.

Also, a note about setting $JAVA_HOME.  At first I didn't know what to set it to, and in the process of hunting for that I found this page

http://developer.apple.com/documentation/Java/Conceptual/Java14Development/01-JavaOverview/JavaOverv...

which says:

"Some applications look for Java’s home directory (JAVA_HOME) on the users system, especially during installation. If you need to explicitly set this, in a shell script or an installer, set it to /Library/Java/Home/. Setting it to the target of that symbolic link can result in a broken application for your customers."

Changing that symbolic link doesn't sit right with me either, particularly, but at least they aren't advising against that. Smiley Happy  I tried using the "Java Preferences" app to tell the system to always use Java 5.0 before I changed the symbolic link, but it did not seem to work.

At this point I haven't actually tried to do anything with Alfresco;  I declared victory when I was able to get to the login page from both versions (one at a time, of course).  I'm still getting an error about Imagemagick being missing, and CIFS is not working as others have noted, but I'll save those for tomorrow.  I wanted to make these notes before I forget what all happened here tonight.

Oh, one more thing - if anyone else is like me and needs to install on a remote server, a combination of OSXVNC on the server and the "Chicken of the VNC" (yes, that's what it's called - logo is a tuna can with a chicken coming out of it) client locally works fine, albeit a bit slow, to run the GUI across the network.  I had some trouble with this also at first;  I kept getting an "incompatible versions" error from the client.  It turned out that despite directions to the contrary, the server defaulted to port 5901 while the client defaulted to 5900.  At least it was easy to fix.

Yes, it has been one of those nights. Smiley Wink

janiner
Champ in-the-making
Champ in-the-making
A few more notes that might help someone…

I installed the binary version of ImageMagick from imagemagick.org into /opt/ImageMagick-6.2.5.  I created the symbolic link from /opt/ImageMagick-6.2.5/bin/convert to /user/bin/imconvert, as specified in the Alfresco readme, and I set DYLD_LIBRARY_PATH in my user's .profile.  All well and good, but I'm starting Tomcat via sudo and my environment variables are not being passed along.  So I added a line to the top of the alfresco.sh script:

. ~janine/.profile

The dot command sources the referenced file and the env variables are thus available when Tomcat starts up.  This got rid of the ImageMagick errors, finally.

My final error to deal with was this one:

17:03:57,265 ERROR [org.alfresco.smb.protocol] CIFS server configuration error, Failed to determine local domain/workgroup

I have not, so far, figured out how to get rid of this.  I saw the other post about editing file-servers.xml, but I can't find a value for host that works.  I tried "localhost_H", and I also tried replacing localhost with the machine's short name and with the full name including domain.  Same error each time (I did restart after each change).

Suggestions on how to fix this welcome.

janiner
Champ in-the-making
Champ in-the-making
One more Mac-ish thing in getting Eclipse to work.

I installed Eclipse 3.1 and detarred the Alfresco source into ~janine/alfresco-rc1.  I pointed Eclipse's import at this director.  It imported everything but spewed errors like

Syntax error, parameterized type only available if source level is 5.0

Google provided the answer - go to Window->Preferences->Java->Compiler and change the Compiler compliance level to 5.0.  It's much happier now.

mjasay
Champ in-the-making
Champ in-the-making
I'd love to see them.  I was about to try setting up Alfresco, but then read through the posts and found that it is a non-trivial task on Mac today.  If someone has time/inclination, please share some brief instructions.  Otherwise, I'm going to make paulhh do it for me when I'm in the UK next week.  javascript:emoticon('Smiley Very Happy')

janiner
Champ in-the-making
Champ in-the-making
The README_osx.txt file that comes in the Alfresco bundles is pretty much tells you everything you need to know.  The only detail they left out is the one about changing your curernt JDK to be version 5, which I believe was documented earlier in this thread.  It has been a little while since I did my OS X install, but I don't recall having any major problems.

mjasay
Champ in-the-making
Champ in-the-making
I can't seem to get JBoss started…

Ensure that the MySQL server is running. [DONE]
Open a new command window and navigate to the '/opt/alfresco' directory
- Run 'alfresco.sh start' to start JBoss

I navigated to /opt/alfresco (cd /opt/alfresco), but when I type in "alfresco.sh start" I get:

"-bash: alfresco.sh: command not found"

When I look at it from OS X's Finder, I can see the file is there.  What is the right command in OS X (in Terminal, I assume) to run the command above to start JBoss?

janiner
Champ in-the-making
Champ in-the-making
For virtually all flavors of UNIX, you have to use "./alfresco.sh start" to indicate you want the one in the current directory.  It was not always like this but over the last few years all the systems I've worked on have added this requirement.  Something about making it harder to trick you into running a Trojan Horse program, as I recall.  I think you have to have specify a path for any program not found on your PATH, or something like that.

For example:
janine-sisks-imac-g5:~ janine$ test.sh
-bash: test.sh: command not found
janine-sisks-imac-g5:~ janine$ ./test.sh
hello