Install GeoNode for Development (Windows)

In order to install Geonode 2.0 in developing mode on Windows 2008r2 the following steps are required:

  1. install dependencies (Python and Java) and supporting tools
  2. set up a virtual environment (virtualenv)
  3. clone geonode from github and install it in the virtual environment
  4. run paver to get install geoserver and start the development servers

Note

The following steps have to be executed in your terminal where there is a “>”. The path will differ depending on installation.

  1. Install Dependencies. All should be found in binary. Only 32 bit versions have been tested.

    > easy_install virtualenv
    
  2. Install Java for Geoserver. If you already have java installed 32 or 64 bit versions work.

  3. Install Supporting tools

  4. Install node and tools for static development (not tested yet)

    > npm install -y -g bower
    
    > npm install -y -g grunt-cli
    
  5. Get the GeoNode Code using Git.

    Open the Git bash or use your command prompt depending on how git was installed This command will download the latest version of GeoNode. For the most recent stable version type number 2.

    git clone https://github.com/GeoNode/geonode.git
    
    git clone -b 2.0.x https://github.com/GeoNode/geonode.git
    
  6. Install all Dependencies in a new virtual environment

    In the command prompt, navigate to where you want your python to be installed.

    virtualenv geonode
    

    Note

    Command not found? Try adding your python scripts folder to the path environment variable. In most cases it is C:Python27Scripts. You will need to start a fresh command prompt to register the variables. See next common error message to add the C:Python27 path

    Note

    Errors about no package found and running python from the command prompt gives command not found, then add C:Python27 to your path environment variable.

    Initialize the virtual environment by navigating to your-virtualenv-directory/Scripts/activate

    After you activate the virtual environment, run the following:

    > pip install paver
    

    Navigate to your geonode code install and run

    > paver win_install_deps
    

    Back to the parent directory

    > cd ..
    
    pip install -e geonode -–use-mirrors
    
    cd geonode
    
  7. Set up the Geoserver with command

    > paver setup
    
  8. Now we can start our geonode instance

    > paver start -–java_path="C:\path\to\java\java.exe"
    

Visit the geonode site by typing http://localhost:8000 into your browser window.

Warning

If the start fails because of an import error related to osgeo, then ensure that the GDAL_LIBRARY_PATH is set in the Windows path.

Warning

If you get GEOSversion function not found, then need to need to change line 71 in geonodeLibsite-packagesShapely-1.3.0-py2.7-win32.eggshapelygeos.py from _lgeos = CDLL(“geos.dll”) to _lgeos = CDLL(“geos_c.dll”). See issue https://github.com/Toblerity/Shapely/issues/136

  1. To stop the server

    type hold Ctrl c on your keyboard to stop the server

    > paver stop    # to stop all django, geoserver services
    
  2. Next create a superuser for your django geonode

    Create a superuser so you can log on to your local geonode installation at http://localhost:8000

    > python manage.py createsuperuser