Today I would like to share some information about how to install and configure Nuxeo 5.2.
Indeed, recently I help a customer to install, configure and customize this OpenSource ECM System in its Windows environment. So let's share :o)
Nuxeo Installation
How to install Nuxeo ?
In general manner, you should download and use Nuxeo 5.2 Windows Installer. You can find it at this url : http://www.nuxeo.com/en/downloads/
This installer is a good starting point to begin a Nuxeo Project. Moreover it also incorporates Nuxeo Shell (a beautiful gift for ECM Administrators). However it embed a java light database (Derby). This database is for demonstration , developments or experiments environments. It's NOT a production database! That's why we have to change Nuxeo settings.
How to configure Nuxeo and PostgreSQL ?
For step by step explanation, have a look at the :
- Nuxeo Book http://doc.nuxeo.org/5.1/books/nuxeo-book/html/admin-database-configuration.html
- Admin Book: http://doc.nuxeo .org/5.1/books/nuxeo-book/html/admin-database-configuration.html
How to configure Nuxeo for a production environment?
- For Nuxeo, the information is here : http://www.nuxeo.org/xwiki/bin/view/Main/NuxeoProdSetup/
- For PostgreSQL, the information is there: http://www.nuxeo.org/xwiki/bin/view/FAQ/PostgreSQLSettings/
Configure Nuxeo
Short Introduction
I usually say, in Open Source ECM context, there are 3 possible ways.
- User approach : User only know how to click on buttons (This is not a criticism or an insult but it huge caricature...)
- Administrator approach : Administrator know how to use and modify humanly comprehensible files (XML, Properties, txt)
- Developer / Integrator approach : Developer is omniscient and omnipotent. He understands and knows everything in programming, configuration and utilization.
In our case we will look only at the administrator level. Indeed many features are configurable through XML files in Nuxeo.
To illustrate this point, I propose the following use case: I want to increase the number of documents displayed in a space/folder/workspace. By default this value is set at 10. If the space contains more than 10 documents, then the user interface will create an automatic 10 to 10 pagination. For ergonomic purpose, I wan to set this value at 25.
Let's explore what are the possible approaches to meet this need
First of all, Nuxeo has 3 IMPORTANT directories :
- NuxeoEP5 \ NuxeoServer \ server \ default \ deploy \ nuxeo.ear \ System
This directory contains Nuxeo heart. - NuxeoEP5 \ NuxeoServer \ server \ default \ deploy \ nuxeo.ear \ plugins
This directory contains all the modules/ addons / plugins / extensions that are not part of the heart Nuxeo. In general this addons are your addons. - NuxeoEP5 \ NuxeoServer \ server \ default \ deploy \ nuxeo.ear \ config
This directory contains all Nuxeo configuration files.
System directory
If you already explore Nuxeo files and folder, you've noticed that most files inside System folder are Jar. For those who are not familiar with this file format, take a look at wikipedia : http://en.wikipedia.org/wiki/JAR . To generalize, it is a ZIP file wich contains java-like files.
So if you have a zip utility like winZip or 7-zip... you can unzip a jar file! So... you can open it and therefore ... you can change the contents of the ZIP!
To complete our task, we have to focus on : Nuxeo-platform-webapp-core-5.2.0.jar
It is located in : NuxeoEP5 \ NuxeoServer \ server \ default \ deploy \ nuxeo.ear \
Open it (with 7-zip in my case) and locate the file OSGI-INF/querymodel-contrib.xml. Edit (or just extract) the file and replace the value 10 by 25 in the next block:

Next, save the file (or import it into the Jar).
You can now restart Nuxeo, importing more than 10 documents in a space and see that there is no pagination creation. We have to import 26 document to see this component.
Now to the second method:
Config directory
As you can see, this directory is composed primarily by configuration XML files. The main purpose of this directory is to configure the global parameters of Nuxeo application. So if we think 5 seconds, it's what we want : we want to set the number of items displayed in a space.
Before all, if you have tested the previous method, you have to remove your change. Then create a configuration-ui-config.xml (the name does not change anything except -config.xml part which should remain unchanged) in the config directory and add the block below:
The most important part is the tag REQUIREYou can now restart Nuxeo, import more than 10 documents in a space and see that there is no default pagination creation.
You just learn a method that works for most of Nuxeo default component.
If we have to create a procedure (a recipe), it would be:
- Open and explore jar files in system directory (with your zip utility: 7zip for me ...).
- Search outXML files (especially files ending with-contrib.xml) in OSGI-INF directories.
- Copy the block you want and remember the name of the component (in general it's the 2nd line of the -contrib.xml file
). - Create your own config.xml file in the config directory .
- Insert the block and change default parameters to match our requirements.
- Remember : you have to respect XML validity and declare it as a XML file.
- Restart your instance.
- You can serve, it is ready! :o) : o)
Finally the last method
Plugins directory
This method (recommanded by Nuxeo) is more scalable, modular, but also the most complicated! (Everything is not allowed particulary in computer science...). I will not going deeper in details with this approach because it is well documented. Remember, if you're interested in the topic, I advise you to read the Nuxeo book draft at: http://www.nuxeo.org/static/dev-tutorial/
Everybody doesn't have time and skills to install and configure Eclipse, JDK, Maven etc ... It's one criticism of this method. It can be a complex task which can sometimes take quite some time ... and therefore money.
On the one hand : Is it advisable to install a development environment for our need ? The answer is NO of course. On the other hand : I want to add and modify many default Nuxeo components and functionality. Do I have to install Eclipse ? Answer is YES ! This environment is necessary.
As often: Everythin depends on your requirements and needs.
Conclusion
To simplify, this is my recommendations (to save time!)
- Banish editing Jar files in system directory !! Sometimes this seems to be the easiest solution but it is the least profitable in the long term. And in the world of opensource change are everywhere (migration, upgrade ...)! The only possible case concerns feature removal. If you have identified a feature that does not interest you, it may be useful to remove associated jar (simplify your installation, gain of time when application start...)
- If you want to change a default Nuxeo component parameters, choose the method based on the configuration directory. It will be in long term the best method.
- If you need to change a component Nuxeo + add files (. Java, images, defining a workflow) or add a component, the preferred method is Plugins.
Finally, if I have an advice : Be curious, navigate and explore the depths of Nuxeo jars!
Have a good journey and see U







2 commentaires: on "Nuxeo Tips : Installation and configuration"
One way to be curious is also to look a Nuxeo source code. This prevents from dezipping nuxeo system jars ;-)
Of course ! :o)
http://hg.nuxeo.org/ and http://maven.nuxeo.org/ are important Nuxeo site!
+1 for Open Source.
Enregistrer un commentaire