Nuxeo on Fedora
From Crashcourse Wiki
Contents |
[edit] What's this all about, then?
The following is a personal perspective on getting Nuxeo's ECM software components up and running on Fedora 11 (soon to be Fedora 12). Eventually, this will be a more comprehensive page but, for now, it's mostly stream of consciousness. Deal with it. :-)
NOTE: This page is now somewhat out of date, so I'll be updating it shortly. Stay tuned ...
[edit] A bit of confusion regarding Nuxeo home pages
There's definite potential for confusion regarding which of Nuxeo's two home pages you want depending on what you're interested in. On the one hand, there's http://nuxeo.com -- the corporate page -- versus http://nuxeo.org, which is clearly the community-oriented page. The potential problem is that, in some cases, you need to know precisely which of those two sites is relevant to what you want.
For example, if you want to peruse Nuxeo's JIRA bug tracker, you need to go to http://jira.nuxeo.org; trying to browse instead to http://jira.nuxeo.com isn't going to do you any good. I have it on good authority that this will all be resolved in the near future.
[edit] The mailing lists
All relevant Nuxeo mailing lists can be found here, in case you need them.
[edit] Fedora packages you'll need
Depending on how carried away you want to get, you'll need to install some set of the following Fedora packages for Nuxeo development.
First, there's the OpenJDK (1.6.0) version of Java, which seems to be fully compatible with Nuxeo DM 5.3:
$ yum search java-1.6.0 ... snip ... java-1.6.0-openjdk.x86_64 : OpenJDK Runtime Environment java-1.6.0-openjdk-demo.x86_64 : OpenJDK Demos java-1.6.0-openjdk-devel.x86_64 : OpenJDK Development Environment java-1.6.0-openjdk-javadoc.x86_64 : OpenJDK API Documentation java-1.6.0-openjdk-plugin.x86_64 : OpenJDK Web Browser Plugin java-1.6.0-openjdk-src.x86_64 : OpenJDK Source Bundle
Install as much of the above as you think you need -- at the very least, the development package.
Next, depending on whether you want to checkout version-controlled Nuxeo content, you'll want to install either or both of Subversion and Mercurial:
# yum install subversion mercurial
Play it safe and just install them both.
If you need Maven, what you really need is Maven 2 so:
# yum search maven2
and install what you need.
(This section is probably going to change soon since I believe Fedora 12 updates a number of packages, so I'll hold off until I have Fedora 12 up and running. And regarding Maven, you might want to keep reading.)
[edit] Downloading Nuxeo DM 5.3
To get started with Nuxeo DM 5.3, simply grab the appropriate tarball from here and unload it wherever you want -- under your personal home directory will do just fine. Some observations on that download, however:
- The Tomcat version of the download is conveniently named nuxeo-dm-5.3.0-GA-tomcat.zip, but the JBoss download is not so conveniently named nuxeo-dm-latest-stable-jboss.zip. It would make more sense to incorporate the version number into all downloadable objects, to avoid later confusion. Rumour has it this will be addressed in the near future.
- While most Linux systems can handle zip-format downloads, it would make more sense to have tarballs (gzip or bzip2) for the Linux downloads. In addition, there should be easily viewable download checksums (MD5, SHA1, SHA256) to verify the integrity of all downloads.
[edit] Running Nuxeo DM 5.3 (JBoss version)
While it's not immediately obvious, it appears that Nuxeo DM 5.3 runs just fine with the Fedora-standard java-1.6.0-openjdk packages (no need for Sun Java). But you have to do a bit of tweaking to get DM up and running first (at least for the time being).
If you simply unload the zip file and follow the instructions in readme.html, you're going to get into trouble, at least on Fedora:
$ bin/jbossctl start bash: bin/jbossctl: Permission denied $
This is because none of the scripts under the bin/ directory are marked executable, and any attempt to run them without explicitly typing "sh <script>" is going to fail exactly the same way. The simple solution, right after unloading the zip file and changing into the download directory:
$ chmod +x bin/{*.sh,jbossctl}
$
Now, running "bin/jbossctl start" should work just fine, and you should be able to browse over to http://localhost:8080/nuxeo and get to work.
UPDATE: The lack of executable settings on those scripts is a known issue, and is being addressed.
[edit] Building Nuxeo 5.3 on Fedora 12
If you want to keep up with the Nuxeo development branches on (the imminent) Fedora 12, here's how to get started. This recipe is meant to be usable by regular users -- you should need root access as little as possible.
[edit] Checking out the Nuxeo sources
First, pick a convenient location under your home directory and check out the entire Nuxeo development content using Mercurial:
$ hg clone -r 5.3 http://hg.nuxeo.org/nuxeo $ cd nuxeo $ ./clone.sh
Note that the clone.sh script refers exclusively to the branches 5.3 and 1.6, which represent the ongoing development branches.
Once that completes, just put it aside for the moment. We'll come back to it but let's deal with JBoss now.
[edit] Getting Sun's Java
No, don't try this with OpenJDK. For reasons I might document later, you really need Sun's current JDK. I'm assuming you can handle that.
[edit] Installing and testing JBoss
For Nuxeo 5.3, you'll need to download and install the appropriate version of JBoss and, as I read it (and to keep things simple), you'll want the 4.2.3 GA version that you can find here. Grab the zip file and unload it, again somewhere under your home directory. For the sake of this install, I'll unload it under ~/jboss so that the actual top-level directory will be ~/jboss/jboss-4.2.3.GA.
Once that's done, edit your personal .bash_profile similar to this:
export JBOSS_HOME=~/jboss/jboss-4.2.3.GA
PATH=${JBOSS_HOME}/bin:$PATH
Don't forget to log out and log back in again to get those changes to take effect. And now, before going any further, you can at least test that you can start this initial install of JBoss from within that new directory:
$ cd ${JBOSS_HOME}
$ bin/run.sh
That should work, after which you should be able to browse to http://localhost:8080 and see the generic JBoss interface. Note that Nuxeo isn't available yet -- all you're doing is testing that the basic JBoss is working. Once you verify that, you can shut it down, and we can get back to setting up Nuxeo. Almost.
[edit] Downloading and installing Maven2
At the moment, the Maven 2 packages that will be available with Fedora 12 are too old for Nuxeo -- they're version 2.0.8 and Nuxeo 5.3 requires a minimum of 2.0.9 (feel free to read the details here). The solution is simple -- download and manually install the latest version of Maven 2 from here.
For simplicity, it's probably easiest to (as root) just unload it under /usr/local so it's available for everyone. Unloading that tarball gave me the resulting directory /usr/local/apache-maven-2.2.1, at which point you need to again edit your .bash_profile and add the appropriate directory to your search path:
PATH=/usr/local/apache-maven-2.2.1/bin:${PATH}
The fact that that directory is at the front of your search path means it will take precedence over older versions of Maven on your system. You can test this with:
$ type mvn mvn is hashed (/usr/local/apache-maven-2.2.1/bin/mvn) $
In addition, Nuxeo's Julien Carsique explains that, if you use this version of Maven, you'll run into this issue, which you can work around via the following patch:
diff --git a/pom.xml b/pom.xml --- a/pom.xml +++ b/pom.xml @@ -1491,7 +1491,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-nuxeo-plugin</artifactId> - <version>1.0.13</version> + <version>1.0.14-SNAPSHOT</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -1564,7 +1564,7 @@ <dependency> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-nuxeo-plugin</artifactId> - <version>1.0.10</version> + <version>1.0.14-SNAPSHOT</version> </dependency> </dependencies> </plugin>
[edit] Finishing off the Nuxeo setup
You can now move back to your Nuxeo checkout directory and, following the instructions in the README.txt file there:
$ cp build.properties.sample build.properties
at which point you should edit that new file and set the variable jboss.dir accordingly, as in:
# Example for Windows #jboss.dir=C:/Program Files/JBoss # Example for Unix jboss.dir=/home/rpjday/jboss/jboss-4.2.3.GA
after which you should be able to run:
$ ant patch
to patch your JBoss install with Nuxeo-specific content. Once that succeeds (as it did on this Fedora 12 Beta system), simply run:
$ ant deploy
at which point, after quite a lot of building, there's a build error. I'm re-running the build again as we speak, so I'll post the results of that later.
LATER: You can see the results of running ant deploy here.
By the way, this system has 4G of RAM and 4G of swap space, so I'm guessing a lack of RAM or swap shouldn't be the problem here. But I've been wrong before.
Random thoughts on any of this to rpjday@crashcourse.ca if you are so inclined.

