Install GeoNode for Development

In order to install Geonode 2.0 in developing mode on Ubuntu 12.04 the following steps are required:

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

Note

The following steps have to be executed in your terminal. The steps have to be done as a root user, therefore don´t forget to type sudo in front!

  1. retrieve latest apt-get list

    $ sudo apt-get update
    
  2. Install build tools and libraries

    $ sudo apt-get install -y build-essential libxml2-dev libxslt1-dev
    
  3. Install dependencies

    Python native dependencies

    $ sudo apt-get install -y python-dev python-imaging python-lxml python-pyproj python-shapely python-nose python-httplib2 python-pip python-software-properties
    

    Install Python Viturual Environment

    $ sudo pip install virtualenvwrapper
    

    Java dependencies

    $ sudo apt-get install -y --force-yes openjdk-6-jdk ant maven2 --no-install-recommends
    

    supporting tools

    $ sudo apt-get install -y git gettext
    
  4. Node and tools required for static development

    This is required for static development

    $ sudo add-apt-repository -y ppa:chris-lea/node.js
    $ sudo apt-get update
    $ sudo apt-get install -y nodejs
    $ sudo npm install -y -g bower
    $ sudo npm install -y -g grunt-cli
    
  5. Set up a virtual environment

    Here is where Geonode will later be running.

    Add the virtualenvwrapper to your new environement

    $ export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python
    $ export WORKON_HOME=~/.venvs
    $ source /usr/local/bin/virtualenvwrapper.sh
    $ export PIP_DOWNLOAD_CACHE=$HOME/.pip-downloads
    

    set up the local virtual environment for Geonode

    $ mkvirtualenv geonode
    $ workon geonode
    

    This creates a new directory where you want your project to be and creates a new virtualenvironment

  6. Get the code

    To download the latest geonode version from github, the command clone is used

    $ git clone https://github.com/GeoNode/geonode.git
    
  7. Install GeoNode in the new active local virtualenv

    $ pip install -e geonode --use-mirrors
    $ cd geonode
    
    If the install fails because of an error related to pyproj not being verified (happens on pip 1.5), use the following:
    
    $ pip install -e geonode --use-mirrors --allow-external pyproj --allow-unverified pyproj
    
  8. Compile and Start the server

    The last step is to compile GeoServer and setup

    $ paver setup
    
  9. Now we can start our geonode instance

    $ paver start
    

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

  10. To stop the server

    type hold Ctrl c on your keyboard to stop the server

    now type:

    $ paver stop    # to stop all django, geoserver services
    
  11. 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

    $ django-admin.py createsuperuser –-settings=geonode.settings
    

Start working on Geonode the next day after install

With every restart of your machine, you have to restart geonode as well. That means, you will not be able to open http://localhost:8000 directly after starting your machine new. In order to be able to use geonode now, you have to activate your virtualenvironment and to start the development servers.

Note

username is the name of your machine and personal folder!

  1. Activate virtualenv

    To activate your virtualenv you just need to type

    $ workon geonode
    

    or

    $ source /home/username/.venvs/geonode/bin/activate
    

    Note

    Be careful with the path, it might not be the same for you!

  2. Start the server

    $ cd geonode
    $ paver start_geoserver
    $ paver start_django
    

    Now you are able to access http://localhost:8000 again.

    Note

    Remember that you have to do these steps each time you restart your machine!!

Hint

Now you’ve followed these installation instructions, geonode is running in development mode. This also means that you are using all the default settings of geonode. If you want to change them, e.g use Tomcat instead of Jetty, or Postgresql instead of sqlite3, you may follow the steps from the section Configure Manually in Complete Installation Guide.