GeoNode Virtual Machine Structure
The Virtual Machine is based on a distribution of:
Ubuntu 22.04.1 (Jammy Jellyfish) Desktop 64-bit
It has been installed with a minimal set of dependencies, except the ones required by the GeoNode installation.
System and Application Users’ Credentials
Username |
Password |
Type |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Changing Screen Resolution and Keyboard Type
Screen Resolution
You can change the screen resolution by right-clicking with the
mouse
on the desktop and selecting theDisplay Settings menu
Select the desired resolution from the dropdown menu and then click on
Apply
Keyboard Layout
You can change the keyboard layout and input language by right-clicking with the
mouse
on the desktop and selecting theSettings menu
Click on the
plus symbol
Click on the
Ellipsis (three dots)
If you don’t see the desired language, click on the
Other
buttonSearch for and select the desired language from the list and click on the
Add
buttonDrag and drop the desired language to the top of the list and delete the other language options
System Services and Log files
Postgresql 13 DBMS
This GeoNode installation relies on a DB hosted by an instance of Postgresql 13 service, with the PostGIS Extensions.
Start and Stop the Service
In order to check the service status run:
sudo systemctl status postgresql
The system will print something like:
● postgresql.service - PostgreSQL RDBMS Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled) Active: active (exited) since Mon 2021-07-12 09:30:39 BST; 2s ago Process: 5458 ExecStart=/bin/true (code=exited, status=0/SUCCESS) Main PID: 5458 (code=exited, status=0/SUCCESS)
Stop the service by running:
sudo systemctl stop postgresql
Start the service by running:
sudo systemctl start postgresql
Check and follow the service logs by running:
sudo tail -500f /var/log/postgresql/postgresql-13-main.log
GeoServer 2.23.0
The geospatial server backend is provided by GeoServer 2.23.0 hosted by an instance of the Apache Tomcat 9.0.48 servlet application provider.
You can access the service interface by pointing the browser to:
http://localhost/geoserver
Start and Stop the Service
In order to check the service status run:
sudo systemctl status tomcat9
The system will print something like:
● tomcat9.service - Apache Tomcat Server Loaded: loaded (/lib/systemd/system/tomcat9.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2021-07-12 09:41:44 BST; 2s ago Process: 6444 ExecStart=/opt/tomcat/latest/bin/startup.sh (code=exited, status=0/SUCCESS) Main PID: 6454 (java) Tasks: 17 (limit: 4652) Memory: 119.3M CGroup: /system.slice/tomcat9.service └─6454 /usr/lib/jvm/java-8-openjdk-amd64/jre//bin/java -Djava.util.logging.config.file=/opt/tomcat/latest/conf/logging.properties -Djava.util.logging.mana> Jul 12 09:41:44 geonodevm-3 systemd[1]: Starting Apache Tomcat Server... Jul 12 09:41:44 geonodevm-3 startup.sh[6444]: Existing PID file found during start. Jul 12 09:41:44 geonodevm-3 startup.sh[6444]: Removing/clearing stale PID file. Jul 12 09:41:44 geonodevm-3 startup.sh[6444]: Tomcat started. Jul 12 09:41:44 geonodevm-3 systemd[1]: Started Apache Tomcat Server.
Stop the service by running:
sudo systemctl stop tomcat9
Start the service by running:
sudo systemctl start tomcat9
Check and follow the service logs by running:
sudo tail -500f /opt/data/geoserver_logs/geoserver.log
GeoServer DATA_DIR and JVM Options
The default GeoServer JVM Options
(heap memory, logs and data dir locations, …) can be set by editing the following file:
sudo vim /opt/tomcat/latest/bin/setenv.sh
By default those options are set as follows:
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre/
GEOSERVER_DATA_DIR="/opt/data/geoserver_data"
GEOSERVER_LOG_LOCATION="/opt/data/geoserver_logs/geoserver.log"
GEOWEBCACHE_CACHE_DIR="/opt/data/gwc_cache_dir"
GEOFENCE_DIR="$GEOSERVER_DATA_DIR/geofence"
TIMEZONE="UTC"
JAVA_OPTS="-server -Djava.awt.headless=true -Dorg.geotools.shapefile.datetime=false -XX:+UseParallelGC -XX:ParallelGCThreads=4 -Dfile.encoding=UTF8 -Duser.timezone=$TIMEZONE -Xms512m -Xmx2048m -Djavax.servlet.request.encoding=UTF-8 -Djavax.servlet.response.encoding=UTF-8 -DGEOSERVER_CSRF_DISABLED=true -DPRINT_BASE_URL=http://localhost:8080/geoserver/pdf -DGEOSERVER_DATA_DIR=$GEOSERVER_DATA_DIR -Dgeofence.dir=$GEOFENCE_DIR -DGEOSERVER_LOG_LOCATION=$GEOSERVER_LOG_LOCATION -DGEOWEBCACHE_CACHE_DIR=$GEOWEBCACHE_CACHE_DIR"
The default GEOSERVER_DATA_DIR
, containing the GeoServer catalog, is set to:
GEOSERVER_DATA_DIR="/opt/data/geoserver_data"
NGINX 1.18.0 HTTPD Server
All the HTTP services are provided through an instance of the NGINX 1.18.0 HTTPD Server.
This service allows to proxy every HTTP-based application through the http://localhost
virtual host.
Start and Stop the Service
In order to check the service status run:
sudo systemctl status nginx
The system will print something like:
● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2021-07-12 09:05:30 BST; 45min ago Docs: man:nginx(8) Process: 636 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS) Process: 693 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS) Main PID: 705 (nginx) Tasks: 3 (limit: 4652) Memory: 11.2M CGroup: /system.slice/nginx.service ├─705 nginx: master process /usr/sbin/nginx -g daemon on; master_process on; ├─710 nginx: worker process └─711 nginx: worker process Jul 12 09:05:29 geonodevm-3 systemd[1]: Starting A high performance web server and a reverse proxy server... Jul 12 09:05:30 geonodevm-3 systemd[1]: Started A high performance web server and a reverse proxy server.
Stop the service by running:
sudo systemctl stop nginx
Start the service by running:
sudo systemctl start nginx
Check and follow the service logs by running:
sudo tail -500f /var/log/nginx/access.log
sudo tail -500f /var/log/nginx/error.log
NGINX localhost configuration files
The main configuration file can be edited by running the following command:
sudo vim /etc/nginx/nginx.conf
The GeoNode/GeoServer configuration file can be edited by running the following command:
sudo vim /etc/nginx/sites-enabled/geonode
GeoNode master
GeoNode is provided by an instance of the UWSGI service.
You can access the GeoNode interface by pointing the browser to:
http://localhost/
GeoNode Source Code
Every time you touch the GeoNode source code (or any of its components) you must enable the correct
VIRTUALENV
. You can do that by running the following command:workon geonode
The GeoNode source code and settings are based on the following folder:
cd /opt/geonode
You can check the GeoNode source code version and history by running the following command from the GeoNode source code folder:
git log
Change the .env settings and restart GeoNode
The GeoNode settings are currently stored on a
UWSGI ini
file:sudo vim /etc/uwsgi/apps-enabled/geonode.ini
Whenever you need to change the settings and restart GeoNode, you can simply run the following command:
touch /opt/geonode/geonode/wsgi.py
Update the GeoNode Statics Files (UI and client updates)
Whenever you need to view the
STATICS
files of GeoNode, you can simply run the following command from the GeoNode source folder:./manage_dev.sh collectstatic touch /opt/geonode/geonode/wsgi.py
GeoNode Logs
Follow the GeoNode log file by running the following command:
sudo tail -500f /var/log/uwsgi/app/geonode.log