1

I am running geonetwork 3.0 on tomcat. I want to put all configuration files to an external directory that is not affected by geonetwork undeploys or upgrades.

I started with this description but the entire process seems to be somewhat complex. Isn't there an easier way like copying the config files to an external dir and changing the directory link e.g. by setting a parameter in context.xml?

Or maybe I just didn't understand the workflow completely.

1

I am not sure I understand your question. Are you talking about externalizing the data directory? Then you can use the same configuration as in 2.10.x. (The documentation for 3.0.x is not finished for that) http://geonetwork-opensource.org/manuals/2.10.4/eng/users/admin/advanced-configuration/index.html?highlight=data%20directory#geonetwork-data-directory

From that link, the resolution order is:

  • Java environment variable (ie. -Dgeonetwork.dir=/a/data/dir)
  • Servlet context parameter (ie. web.xml)
  • Config.xml appHandler parameter (ie.config.xml)
  • System environment variable (ie. geonetwork_dir=/a/data/dir). ”.” is not supported in env variables

If you are looking on changes on the database configuration (or any other spring file), then you cannot use the default war installation, you should configure it on the source code and then build the war.

The war and the installer are not for complex production use, they are provided for users who just want to do quick deployments or "play" with GeoNetwork to see if they like it.

Is that what you were looking for?

  • Well, first I am not sure from both links, what's the exact meaning of "data dir". From what I know from geoserver, I would expect this is where data is stored, not configuration. But your link says data directory is ... where GeoNetwork stores much of its custom configuration. What I want is to have all config* folders and files from geonetwork/WEB-INF outside the deployed war. I suppose that should be a separate folder from that one, where harvested data is stored. That's something I would expect in a "data dir". – ulrich Dec 21 '15 at 19:32
  • From the documentation, I used a context parameter like this <Parameter name="geonetwork.dir" value="/geonetworkdir" /> and <Parameter name="<webappname>.dir" value="/geonetworkdir" /> but none seems to work. Do you have a clue, if this syntax is incorrect? – ulrich Jan 16 '16 at 22:02
  • What is the name of the war/webappname? Are you using the context xml file to deploy it or the war file? – María Arias de Reyna Domínguez Jan 22 '16 at 9:28
  • The war name is geonetwork-3.0.3.war. I deployed from warfile and created the parameter in context.xml because I was sure it should overwrite war file web.xml settings. If I enable geonetwork.dir in the web.xml, it works fine. But it will not overwrite the param from context.xml neither with geonetwork.dir nor geonetwork-3.0.3.dir. – ulrich Jan 24 '16 at 17:23
  • I mean: are you deploying by context file or by placing the war file on the webapps folder? – María Arias de Reyna Domínguez Jan 26 '16 at 11:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.