Install GeoNode for Development
In order to install Geonode 2.0 in developing mode on Ubuntu 12.04 the following steps are required:
- install build tools and libraries
- install dependencies (Python and Java) and supporting tools
- add PPA repository
- set up a virtual environment (virtualenv)
- clone geonode from github and install it in the virtual environment
- 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!
-
retrieve latest apt-get list
$ sudo apt-get update
-
Install build tools and libraries
$ sudo apt-get install -y build-essential libxml2-dev libxslt1-dev
-
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
-
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
-
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 >> ADDED BY J2ON $ export LD_LIBRARY_PATH=/usr/local/lib
set up the local virtual environment for Geonode [HERE IS THE PLACE YOU FEEL -_-a]
$ mkvirtualenv geonode $ workon geonode
This creates a new directory where you want your project to be and creates a new virtualenvironment
-
Get the code
To download the latest geonode version from github, the command clone is used
$ git clone https://github.com/GeoNode/geonode.git
-
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
-
Compile and Start the server
The last step is to compile GeoServer and setup
$ paver setup
>> ADDED BY J2ON
GeoNode development environment successfully set up.If you have not set up an administrative account, please do so now. Use “paver start” to start up the server.
-
Now we can start our geonode instance
$ paver start
Visit the geonode site by typing http://localhost:8000 into your browser window.
-
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
-
Next create a superuser for your django geonode
Create a superuser so you can log on to your local geonode installation athttp://localhost:8000
$ django-admin.py createsuperuser –-settings=geonode.settings