Setting up GeoNode 2 on 12.04 VM on CedeusGeoNode
From stgo
>> return to Cedeus_Technical_Architecture
Contents
basic steps performed
- create a new VM with Ubuntu 12.04 - with openssh and mail installed
- remove the cl locale of /etc/apt/sources.list
- update and upgrade => important because of hardbleed bug
- shutdown + remove the iso from the VM
- copied the VM => basicUbuntu1204.zip
setting up GeoNode
- a listing of necessary packages is here: http://docs.geonode.org/en/master/tutorials/admin/install/custom_install.html#custom-install
- so we need to install
- (i) apache2,
- (ii) Java + Tomcat7,
- (iii) postgresql (postgis only if we want to store the geodata locally),
- (iv) python stuff for django
- install apache2
sudo apt-get install apache2
- install tomcat7
sudo apt-get install tomcat7
- install python
sudo apt-get install python-software-properties
- to install postgresql is not really necessary, as postgres 9.1 will be also installed by geonode, and I am using for my data an external postgresql-postgis db. However, I want 9.3 so:
- see here about adding the repo: http://www.postgresql.org/download/linux/ubuntu/
-
sudo apt-get update
-
sudo apt-get install postgresql-9.3 pgadmin3 postgresql-contrib
- perform:
sudo -u postgres psql
and thenCREATE EXTENSION adminpack;
- => note, after installing my postgresql 9.3 will be accessed via port 5432
- for doc see also: http://docs.geonode.org/en/master/tutorials/admin/install/install_postgresql.html#install-postgresql
- install GeoNode:
- add the geonode repo key:
sudo add-apt-repository ppa:geonode/release
- update the package list:
sudo apt-get update
- install geonode:
sudo apt-get install genode
NB:this wil also install postgres9.1! -
sudo geonode-updateip 127.0.0.1
-
geonode createsuperuser
- modify setting in /etc/geonode/local_settings.py and restart apache
- => now the geonode webpage should be running!
- Btw. the psotgres 9.1 version installed together with geonode will be accessed via port 5433, while 5432 is used by 9.3 already
- add the geonode repo key:
modify GeoNode styling
- change webpage colors and add cedeus logo
- create folders /etc/geonode/media/geonode/img/ and /etc/geonode/media/geonode/css/
- copy cedeus logo.png and cedeus base.css into its corresponding folder (may require chmod 777)
- perform
sudo geonode collectstatic -v0
- => check if it worked
- change welcome text for es/en/de
- change django.po files for each language in /usr/local/lib/python2.7/dist-packages/geonode/locale (for german file, check around line 3600) (may require switch of chmod 777 from originally 755)
- run
sudo geonode compilemessages -l de
from "/usr/local/lib/python2.7/dist-packages/geonode/" for each particular language
- => check if it worked
fine tuning for working with Geonode
see also http://docs.geonode.org/en/latest/tutorials/admin/production.html
- direct access to the db with PgAdmin:
- modify /etc/postgresql/9.3/main/postgresql.conf and /etc/postgresql/9.3/main/pg_hba.conf (for pq_hba.conf see http://www.glom.org/wiki/index.php?title=Initial_Postgres_Configuration)
- => be sure to edit the right postgres files with respect to the installed postres versions
-
sudo service postgresql restart
- check if connection with pgAdmin to geonode db works (which contains user and metadata)
- set the memory for tomcat7: create file /usr/share/tomcat7/bin/setenv.sh and add the following lines
#!/bin/sh JAVA_OPTS="-Xms512m -Xmx4g -XX:MaxPermSize=270m -server -Djava.awt.headless=true -Djava.util.prefs.systemRoot=$CATALINA_HOME/content/thredds/javaUtilPrefs" export JAVA_OPTS
- disallow user self registration - Note, does not seem necessary. Default seems to be "False".
- add to /etc/geonode/local_settings.py the line
REGISTRATION_OPEN=True
for enabling registration to all
- add to /etc/geonode/local_settings.py the line
- create users and user groups
- use the admin option from within geonode, which links to the django admin pages
- eg. I created two user groups cedeusadmin and cedeususer with user stefanS (1...a) as member of the latter group, and stefanadmin(20..s) as "staff member" a default group
- adjust geoserver settings as described under http://docs.geonode.org/en/latest/tutorials/admin/production.html
- add proxy address under global settings
- change admin pw, plus create "cedeus" user for backup resasons (pw same as for external postgisdb)
- add host IP for printing to /usr/share/geoserver/data/printing/config.yaml