Desarrollo personalizado para CentroGEO de la plataforma GeoNode.
Esta adaptación deriva de la versión 2.4alpha14 (aprox.) de la rama Master de desarrollo del repositorio oficial del proyecto:
https://github.com/GeoNode/geonode
Su estado actual es una version de desarrollo que puede ser utilizada sobre Ubuntu 14.04.
Clonando este repositorio se tendra una version funcional con base de datos en SQLite3.
Para hacer desarrollo en el código fuente, estas son las instrucciones:
# Obten la ultima lista apt-get
sudo apt-get update
# Herramientas y librerias esenciales.
sudo apt-get install -y build-essential libxml2-dev libxslt1-dev libjpeg-dev gettext git python-dev python-pip
# Instale dependencias Java
sudo apt-get install -y --force-yes openjdk-6-jdk ant maven2 --no-install-recommends
# Aqui hay dos opciones:
- Instalar directamente en el sistema
- Instalar en un entorno virtual
# 1.- Para instalar directamente en el sistema
# Dependencias Python y Django con paquetes oficiales
sudo apt-get install python-pillow python-lxml python-psycopg2 python-django python-bs4 python-multipartposthandler transifex-client python-paver python-nose python-django-nose python-gdal python-django-pagination python-django-jsonfield python-django-extensions python-django-taggit python-httplib2
# 2. Para instalar en un entorno virtual
# Dependencias Python y Django
sudo apt-get install python-psycopg2 python-bs4 python-gdal
# Asegurarse de que gdal esta instalado en el sistema:
gdal-config --version
# Si no se obtiene la version instalada ejecutar
sudo apt-get install libgdal-dev
# Cree un entorno virtual (ej. geonode)
# Active el entorno virtual
# Instale dependencias dentro del Entorno virtual
(geonode)$ pip install pillow django multipartposthandler transifex-client paver nose django-nose django-pagination django-jsonfield django-extensions django-taggit httplib2 lxml
# Instalar GDAL dentro del Entorno virtual
(geonode)$ pip install --no-install gdal
# Ir a la a la ruta del entorno virtual
(geonode)$ cd .virtualenvs/geonode/build/gdal/
# Ejecutar
(geonode)$ python setup.py build_ext --gdal-config=gdal-config --library-dirs=/usr/lib --libraries=gdal --include-dirs=/usr/include/gdal install
# Ir a la a la ruta del entorno virtual
(geonode)$ cd .virtualenvs/geonode/lib/python2.7/site-packages
# Crear el archivo gdal.pth en la ruta especificada
gedit virtualenv/geonode/lib/python2.7/site-packages/gdal.pth
# Agregar las siguientes líneas al archivo gdal.pth que se acaba de crear y guardarlo
/usr/lib/
/usr/include/gdal
# Clone GeoNode en la ubicacion deseada
git clone https://github.com/isralopez/geonode.git
# Instalar GeoNode en modo editable
# Sin entorno virtual:
sudo pip install -e geonode
# Con entorno virtual:
(geonode)$ pip install -e geonode
# Cambiar al directorio
cd geonode
# Compila GeoServer
paver setup
# Arranque el servidor de desarrollo
paver start
# Visita la dirección de desarrollo:
Una vez totalmente iniciado, se debe mirar un mensaje indicando la dirección de tu geonode.
El usuario y contraseña por default son:admin y admin:
Development GeoNode is running at http://localhost:8000/ The GeoNode is an unstoppable machine Press CTRL-C to shut down
Basandose en las instrucciones proporcionadas en las siguientes ligas seria posible adecuar esta version para un entorno de producción:
http://geonode.readthedocs.org/en/latest/tutorials/admin/install/custom_install.html#custom-install http://docs.geonode.org/en/dev/deploy/production.html
(DE AQUI EN ADELANTE ES OPCIONAL)
Before starting GeoNode (paver start), you could test your installation by running tests:
paver test paver test_integration
In case you want to build yourself the documentation, you need to install Sphinx and the run 'make html' from within the docs directory:
pip install Sphinx cd docs make html
You can eventually generate a pdf containing the whole documentation set. For this purpose, if using Ubuntu 12.4 you will need to install the texlive-full package:
sudo apt-get install texlive-full make latexpdf
Note
When running virtualenv venv the --system-site-packages option is
not required. If not enabled, the bootstrap script will sandbox your virtual
environment from any packages that are installed in the system, useful if
you have incompatible versions of libraries such as Django installed
system-wide. On the other hand, most of the times it is useful to use a version of
the Python Imaging Library provided by your operating system
vendor, or packaged other than on PyPI. When in doubt, however, just leave
this option out.