AnsweredAssumed Answered

Alfresco on CENTOS as VMWare 5.5 guest OS

Question asked by nonprofit_guru on Feb 18, 2006
Latest reply on Jun 19, 2006 by rtroth
Environment:
CENTOS 4.2 as a guest OS on VMWare 5.5 workstation on WinXP Host
- ALL updates are installed for host and guest OS

- MySQL is running and can log into alfresco database at the command line.
- JAVA_HOME reflects /usr/java/jdk1.5.0_06/bin
- the command "java -version" yields:
    java version "1.5.0_06"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
    Java HotSpot(TIM) Client VM (build 1.5.0_06-b05,mixed mode, sharing)

- copy the zstart* to start*
- edited the pointer in start to /usr/lib/ooo-1.1/program/* which is actual location of soffice, et al.
- Apache 2.0.52 is working on port 80
- execute /opt/alfresco/alfresco.sh and it shows some results from the script.

HOWEVER, http://localhost:8080/alfresco says "can't be found".

SO, I go back to /opt/alfresco and try to STOP the process and what do I see?  You guessed it:

INCORRECT path to java at line 269 in catallina.sh.
To be precise:  my JAVA_HOME included the */bin directive.

IT WON'T WORK THAT WAY! (he said loudly!)
But quite frustrating to figure out why.

The baseline problem created by me by following a CENTOS forum posting for adding jdk 1.5.x.

In a forum posting on CENTOS, the collaborator explicitly suggested setting JAVA_HOME in an /etc/profile.d/java.sh script as
"/usr/java/jre1.5.0_06/bin" when in fact if you download the jdk from Sun there is a nice RPM already bundled but it installs in
/usr/java/jdk1.5.xxx

Once I changed my JAVA_HOME so that the */bin was removed, the next attempt to start Alfresco worked perfectly.

I've been doing *NIX stuff for more than 20 years.
This took me most of two days thinking that it was something wierd (again) with RH, when the cause was simply an unconnected piece of information.  I never thought to try and STOP alfresco in the past because when I got the localhost:8080/alfresco response that it couldn't be found, I assumed it wasn't running (true) so just didn't think it was necessary to stop something that wasn't running!  (doh, doh, dodo-bird dodo all over the house!!!)

Alfresco install docs say "… have a valid JAVA_HOME."

my $PATH and ability to execute java -version works with either JAVA_HOME config, but catallina.sh must be feminine 'cuz SHE only works when the right buttons are pushed!  (OK flame me, I don't care…Alfresco works and I'm celebrating!)  The right buttons according to catalina.sh do NOT include */bin in JAVA_HOME.

So bottom line:
1) It can be done on CENTOS 4.2 with a little tinkering
2) It wasn't anything to do with VMWare (fortunately)
3) Perhaps just a few more chars in the Alfresco install docs regarding JAVA_HOME would help someone else who may not want to wade thru this  epistle.

ADDED:  As in the tribulations at:
http://www.alfresco.org/forums/viewtopic.php?t=667&highlight=404

I also had that 404 issue to deal with.

I resolved it by:
1) Going to /var/lib/mysql/alfresco and editing the db.opt file to add the specification to create INNODB tables, since the default install didn't specify.
2) Restart the mysqld (/etc/rc.d/init.d/mysqld restart
3) Restart alfresco
4) Voila….it works.

HTH somebody and best regards to all.
Dave Nuttall
San Antonio, Texas

Outcomes