Complete Installation Guide¶
The quick installation guide contains instructions to set it up in most common platforms. It can be found here.
This page describes a generic installation process for GeoNode systems. For some platforms the GeoNode project also provides customized installers which are easier to use and more reliable.
The most generic package provided by the GeoNode project is a release tar.gz (“tarball”).
This is the most customizable, but also the most difficult, installation mechanism for GeoNode.
Some platforms have more convenient packages available, so check below to see whether one is available for your OS before going through these steps.
Recommended Minimum System Requirements¶
For deployment of GeoNode on a single server, the following are the bare minimum system requirements:
- 6GB of RAM, including swap space.
- 2.2GHz processor. (Additional processing power may be required for multiple concurrent styling renderings)
- 1 GB software disk usage.
- Additional disk space for any data hosted with GeoNode and tiles cached with GeoWebCache. For spatial data, cached tiles, and “scratch space” useful for administration, a decent baseline size for GeoNode deployments is 100GB.
- 64-bit hardware recommended.
Installing GeoNode from a release¶
What’s in the Package?¶
This packaging contains both the Java and Django web application code for GeoNode, and requires some external software installed (a WSGI-compliant webserver and a Java application container) to complete the GeoNode platform.
Some scripts are included to assist in configuring this external software in a default recommended configuration.
These scripts have been tested on Ubuntu, please review them carefully before using them on another operating system.
While we intend to provide a detailed, accurate explanation of the installation process, it may become out of date. If you run into problems with the process described in this document, please don’t hesitate to let the GeoNode team know so we can keep it up to date.
The stack used is:
- Servlet Container: Apache Tomcat
- Static File Server: Apache httpd
- Python/WSGI Container: mod_wsgi
- Django Database: PostgresQL
Download GeoNode Release Archive¶
You can unpack it like:
$ tar xvzf GeoNode-1.2.tar.gz GeoNode-1.2/geonetwork.war GeoNode-1.2/geonode-webapp.pybundle GeoNode-1.2/geoserver.war GeoNode-1.2/bootstrap.py GeoNode-1.2/requirements.txt GeoNode-1.2/install.sh GeoNode-1.2/support/
This tarball comes with an install script and a directory with supporting config files.
As mentioned above, you must have some external software installed before you can setup GeoNode. This includes:
- A Python interpreter
- A Java Runtime Environment (JRE)
- Apache Tomcat servlet container
- Python development libraries
- PostgresQL database
- The GDAL, GEOS, and OGR geospatial software libraries
For convenience, appropriate commands to retrieve these dependencies on different OS’s are listed below:
$ sudo apt-get install python python-support python-dev python-virtualenv \ openjdk-6-jre tomcat6 postgresql-8.4 gcc patch zip python-imaging \ gdal-bin libgeos-dev python-urlgrabber \ python-pastescript gettext postgresql-contrib \ postgresql-8.4-postgis,libpq-dev unzip libjpeg-dev libpng-dev \ python-gdal libproj-dev python-psycopg2 apache2 libapache2-mod-wsgi\ libxml2-dev libxslt1-dev
$ su -c 'yum install python26' $ su -c 'yum install httpd' $ su -c 'yum install python26-virtualenv' $ su -c 'yum install python26_mod_wsgi'
The installer script has a configuration file associated with it which allows you to provide the details of your installation, such as where your webserver looks for documents.
These vary from distribution to distribution - for example Ubuntu systems keep Apache site configurations in /etc/apache2/sites-available/ while CentOS uses /etc/httpd/conf.d/; and of course if you are using custom-built software you may need a totally separate configuration.
Samples for common platforms are included, please check for one that matches your distribution.
If it is not available or you would like to install to a custom directory, the configurations are simple shell scripts and you can copy and modify one to meet your needs.
More instructions can be found in the README distributed with the release as well as the pointer to the documentation page about configuring GeoNode for production after it has been installed.
After unpacking the .tar.gz archive and locating or constructing a configuration for the install, you can install GeoNode by simply running the script (usually it is necessary to run it as a root user to allow adding files to system directories.)
For example, on ubuntu you can use the provided configuration in support/config-ubuntu.sh
$ cd GeoNode-1.2/ $ sudo ./install.sh support/config-ubuntu.sh
This section is mostly intended for packagers working on installers for GeoNode on new platforms. If you simply want a customized installation of GeoNode, we recommend reviewing and modifying the installer script included with GeoNode instead of starting “from scratch.”
A GeoNode installation has two webservers running side-by-side, one for the Java applications and another one for the Python/Django applications and static files.
The key steps for setting up a GeoNode installation are as follows:
Set up applications.
The GeoServer and GeoNetwork web applications must be served using a Java Servlet container; two popular and free containers are Jetty and Tomcat.
Typically a Java web application can be deployed by simply copying the .war file into the appropriate place.
The Django frontend can be served in various ways, one of the most performant is Apache httpd with mod_wsgi installed.
Regardless of the specific deployment technology you choose, GeoNode includes a Pip bundle containing its Python dependencies; once you install Python and Pip for your platform you can install the rest of GeoNode’s Python dependencies using pip install geonode-webapp.pybundle.
The Django project has further documentation on how to serve Django applications at https://docs.djangoproject.com/en/1.2/howto/deployment/ .
You will also need a web server capable of simply serving static files; if you are using Apache httpd it can serve this purpose as well.
Configure them to talk to each other.
GeoNode’s components communicate over HTTP, and therefore must know each others’ URLs.
Two settings files contain the settings relevant to most GeoNode deployments:
GeoServer’s WEB-INF/web.xml file; this will be in the “exploded war” directory created when your servlet container deploys the GeoServer application.
You can edit it in the text editor of your choice, add a config-param element with the name “GEONODE_BASE_URL” and the value being the base URL of your site.
The Django application’s settings.py file; this will be in the directory where you installed the Django application under src/GeoNodePy/settings.py.
In order to simplify upgrades, it is recommended to create a new file next to it named local_settings.py for your own settings; any settings in this file will override the default ones in the settings file included with GeoNode.
The settings to use here are:
SITEURL the base URL for all pages in your GeoNode site, for example http://example.com/
GEOSERVER_BASE_URL the base URL for the GeoServer for your GeoNode site, for example http://example.com/geoserver/.
Some features of GeoNode require you to set up a web proxy so that GeoServer and the Django application are on the same domain (“example.com” in this example.).
GEONETWORK_BASE_URL the base URL for the GeoNetwork for your GeoNode site, for example http:/example.com/geonetwork/.
GEONODE_CLIENT_LOCATION the URL where the static files for GeoNode are published, for example http://example.com/media/. These files can be found on disk in the directory where you installed the Django application under src/GeoNodePy/geonode/media/ .
Java Web Applications (WARs)¶
GeoNode requires a Java servlet container compatible with the J2EE standard, 2.5 or higher. Jetty and Tomcat are two good free servlet containers. See their web sites for installation and application deployment instructions.
GeoNetwork with GeoNode Schema¶
GeoNode’s GeoNetwork integration requires use of a customized metadata schema. The GeoNode project provides a custom build of GeoNetwork with this extra schema pre-installed. This GeoNetwork is ready to run out-of-the-box; simply deploy using your servlet container’s usual mechanism.
- Deploy GeoNetwork to your servlet container using the normal mechanism. For Tomcat and Jetty, this simply means placing geonetwork.war in the webapps subdirectory of the servlet container’s installation directory.
- Configure GeoNetwork by changing the administrative account password through GeoNetwork’s web interface. The administrative account username and password are both admin by default.
- Remove the sample metadata records that are included with GeoNetwork by default. To do so, you can simply perform a search with no terms after logging in, then use the ‘Select all’ link on the search results page to select all records in the GeoNetwork site. Finally, use the ‘actions on selection’ menu to delete the records.
GeoServer with GeoNode Extensions¶
GeoNode’s GeoServer integration requires some specific extensions to help GeoNode in managing GeoServer layers. GeoNode releases include a GeoServer WAR archive with these extensions pre-installed. However, some manual configuration may still be needed.
Deploy GeoServer to your servlet container using the normal mechanism. For Tomcat and Jetty, this simply means placing geoserver.war in the webapps subdirectory of the servlet container’s installation directory.
Configure GeoServer with the location of the GeoNode site, used for authentication (so that GeoServer can recognize logins from the main site). This setting defaults to http://localhost:8000/, so if you are running the GeoNode Django application on a different port, or on a different server from the one running GeoServer, then you will need to change this by adding a block of XML to WEB-INF/web.xml within the unpacked application directory, like so:
<context-param> <param-name>GEONODE_BASE_URL</param-name> <param-value>http://localhost:8080/</param-value> </context-param>
The <param-value> tag should enclose the URL to the Django application homepage.
- Configure a document root in your webserver, pointing to some directory on your filesystem.
Django Web Application¶
The GeoNode Django application should run in mod_wsgi under Apache httpd. See the Django project’s deployment documentation for more information. However, we highly recommend using virtualenv to sandbox the GeoNode dependencies from the rest of the Python software on your system.
Install virtualenv if you do not already have it available. It can easily be installed via easy_install or pip:
$ easy_install virtualenv $ pip install virualenv
Prepare a sandbox for GeoNode using virtualenv:
$ virtualenv geonode $ cd geonode $ source bin/activate
Install the geonode python modules from the Pip bundle:
$ pip install geonode-webapp.pybundle
If this step fails, make sure that you have a working C++ compiler installed and development versions of the requisite libraries, listed in the GeoNode README file.
Configure the geonode Django app by editing ./src/GeoNodePy/geonode/settings.py. The available settings and their usage is described elsewhere in this documentation.
If running via fastcgi, you can use the django-admin.py script to launch the fastcgi server for Django. If running via WSGI, ensure that the virtualenv is added to the python path for the WSGI script. See the official Django deployment documentation for details.