Version 16 (modified by 12 years ago) ( diff ) | ,
---|
How to compile GeoNetwork
You don't need to build or use the GeoNetwork installer; you can build directly from the source code.
GeoNetwork build 2.6.5, 2.8.x and after
git clone --recursive https://github.com/geonetwork/core-geonetwork.git geonetwork cd geonetwork mvn clean install mvn assembly:assembly mv target/release/geonetwork-2.9.0-SNAPSHOT-bin.zip /tmp/. cd /tmp unzip geonetwork-2.9.0-SNAPSHOT-bin.zip cd geonetwork/jetty ../bin/start-geonetwork.sh
Go to http://localhost:8080/geonetwork
To checkout an alternative branch you can use the following commands after the "cd geonetwork" command above.
git checkout 2.8.x git submodule foreach git checkout 2.8.x
Go to HowToWorkWithGit for more details regarding Git.
GeoNetwork build 2.5.1 to 2.6.4 (also includes 2.7.x development)
svn co https://geonetwork.svn.sourceforge.net/svnroot/geonetwork/trunk geonetwork cd geonetwork mvn clean install mvn assembly:assembly mv target/release/geonetwork-2.5.0-SNAPSHOT-bin.zip /tmp/. cd /tmp unzip geonetwork-2.5.0-SNAPSHOT-bin.zip cd geonetwork/jetty ../bin/start-geonetwork.sh
Go to http://localhost:8080/geonetwork
GeoNetwork build 2.4.x and previous release
Once you have checked out a copy of GeoNetwork from Subversion, you need to build the system and initialize the database.
- Run
ant
in the top level (no need to typeant all
; the default build does the same thing). - Change to the
bin
directory - If you are using a recent checkout of trunk and you don't want to use the default port of 8080, edit
jetty.xml
manually, search for8080
, and replace it with your port number of choice. - Start up GAST (use either
gast.bat
orgast.sh
as appropriate for you). - In GAST, Configure your settings - at least:
- (If using an older version of GAST) Configuration -> Jetty: change the port number if you like and press Save
- Configuration -> DBMS: change the port number if you like and press Save
- Database -> Setup: press the Setup button!
- You may get a warning about circular references; this is "normal".
- Quit GAST.
- You can now start GeoNetwork using the
start-geonetwork.
(sh
,bat
) script. - Done! Load up in your browser.
- If you want to load the sample data, start up GAST again, i.e., after you started GeoNetwork, select Options from the Config menu and enter your database settings - for default McKoi, select "Use this account" and use
admin
as username and password. Then go to Database -> Sample data and press the Import button.
JS build
Some javascript files are minified and concatenated scripts from JavaScript libraries using jsbuild process. Actually only OpenLayers, GeoExt and extent map editor is using this process. The file full.cfg defines:
- name of the lib to buld
- directories to look into
In order to build:
- remove old lib file.
- install jsbuid
sudo apt-get install python-setuptools sudo easy_install jstools
- jsbuild directory, run jsbuild utility. This will create geo-libs.js files used by GeoNetwork
jsbuild -o ../web/geonetwork/scripts/geo full.cfg
If you don't want to use this small file (for debugging), add the "debug" parameter to your url (eg. main.home?debug) which will use the non minified JS files (see xsl/geo/utils.xsl).