Installez l’Application GeoNode¶
Dans cette section, vous allez installer tous les paquets de base et les outils nécessaires pour une installation complète de GeoNode.
Connexion¶
Lorsque vous démarrez la Machine virtuelle à la fin de la procédure de démarrage, on vous demandera le mot de passe utilisateur pour vous connecter. Entrez geo comme mot de passe utilisateur et appuyez sur Enter.

Vous êtes maintenant connecté en tant qu’utilisateur geo. Sur le côté gauche de l’écran, il y a un panneau avec des raccourcis vers des applications courantes, lancer l’émulateur de terminal.

Installation de paquets¶
First we are going to install all the software packages we are going to need for the GeoNode setup. Among others Tomcat 8, PostgreSQL, PostGIS, Apache HTTP server and Git. Run the following command to install all the packages
$ sudo apt-get update
$ sudo apt-get install python-virtualenv python-dev libxml2 libxml2-dev libxslt1-dev zlib1g-dev libjpeg-dev libpq-dev libgdal-dev git default-jdk
$ sudo apt-get install build-essential openssh-server gettext nano vim unzip zip patch git-core postfix
$ sudo apt-add-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer
$ sudo apt-add-repository ppa:ubuntugis && sudo apt-get update && sudo apt-get upgrade
$ sudo apt-add-repository ppa:ubuntugis/ppa && sudo apt-get update && sudo apt-get upgrade
$ sudo apt-get install gcc apache2 libapache2-mod-wsgi libgeos-dev libjpeg-dev libpng-dev libpq-dev libproj-dev libxml2-dev libxslt-dev
$ sudo apt-add-repository ppa:ubuntugis/ubuntugis-testing && sudo apt-get update && sudo apt-get upgrade
$ sudo apt-get install gdal-bin libgdal20 libgdal-dev
$ sudo apt-get install python-gdal python-pycurl python-imaging python-pastescript python-psycopg2 python-urlgrabber
$ sudo apt-get install postgresql postgis postgresql-9.5-postgis-scripts postgresql-contrib
$ sudo apt-get install tomcat8
$ sudo apt-get update && sudo apt-get upgrade && sudo apt-get autoremove && sudo apt-get autoclean && sudo apt-get purge && sudo apt-get clean

Avertissement
The installation process is going to take several minutes and it will need to download packages from Internet.
À ce stade, nous avons tous les paquets que nous avons besoin sur le système.
Programme d’installation GeoNode¶
First of all we need to prepare a new Python Virtual Environment:
$ sudo apt install python-pip
$ pip install --upgrade pip
$ pip install --user virtualenv
$ pip install --user virtualenvwrapper
# The commands above will install the Python Venv packages
$ export WORKON_HOME=~/Envs
$ mkdir -p $WORKON_HOME
$ source $HOME/.local/bin/virtualenvwrapper.sh
$ printf '\n%s\n%s\n%s' '# virtualenv' 'export WORKON_HOME=~/Envs' 'source $HOME/.local/bin/virtualenvwrapper.sh' >> ~/.bashrc
$ source ~/.bashrc
# We have now configured the user environment
$ mkvirtualenv --no-site-packages geonode
# Through this command we have created a brand new geonode Virual Environment
$ sudo useradd -m geonode
$ sudo usermod -a -G geonode geo
$ sudo chmod -Rf 775 /home/geonode/
$ sudo su - geo
# The commands above are needed only if geo and geonode users have not been already defined
Let’s activate the new geonode Python Virtual Environment:
$ workon geonode
Move into the geonode home folder
$ cd /home/geonode
We are going to install GeoNode as a dependency of a Customized DJango Project
Note
A custom project is a DJango application with ad hoc configuration and folders, which allows you to extend the original GeoNode code without actually dealing or modifying the main source code.
This will allow you to easily customize your GeoNode instance, modify the theme, add new functionalities and so on, and also being able to keep updated with the GeoNode latest source code.
For more deails please check https://github.com/GeoNode/geonode-project/tree/master
$ pip install Django==1.8.18
$ django-admin.py startproject --template=https://github.com/GeoNode/geonode-project/archive/2.9.x-rev.zip -e py,rst,json,yml my_geonode
Let’s install the GeoNode dependencies and packages into the Python Virtual Environment:
$ cd my_geonode
$ vim requirements.txt
# Make sure requirements contains reference to geonode master branch
-e git://github.com/GeoNode/geonode.git@master#egg=geonode
$ pip install -r requirements.txt
$ pip install -e .
$ pip install pygdal==2.2.1.3
# The closest to your `gdal-config --version`
In the next section we are going to setup PostgreSQL Databases for GeoNode and finalize the setup