Opened 10 years ago

Closed 10 years ago

#1168 closed task (fixed)

Configure GeoNode to use postgis and fix permission problems

Reported by: ingenieroariel Owned by: live-demo@…
Priority: major Milestone: OSGeoLive7.0
Component: OSGeoLive Keywords:


Jeff Johnson provided a guide in

# set to use sqlite by default, cant create superuser cuz read-only db
# use postgres
sudo su - postgres
createuser geonode
psql -c "alter user geonode with encrypted password 'geonode';"
createdb -O geonode geonode
sudo vi /etc/postgresql/9.1/main/pg_hba.conf 
# change local access to password
sudo /etc/init.d/postgresql restart
# setup
cd /usr/lib/python2.7/dist-packages/geonode/
sudo wget
sudo mv
sudo /etc/init.d/apache2 restart
# syncdb
django-admin syncdb --settings=geonode.settings --all
# create a superuser (one from fixtures doesnt seem to work)
django-admin createsuperuser --settings=geonode.settings
# change to port 8082 in
django-admin updatelayers --settings=geonode.settings
# make the uploaded dir
sudo mkdir /usr/lib/python2.7/dist-packages/geonode/uploaded
sudo chown user:user /usr/lib/python2.7/dist-packages/geonode/uploaded
# run updatelayers
django-admin updatelayers --settings=geonode.settings
# this will have created the dirs under uploaded to be owned by user 
# chown them to apache
sudo chown -R www-data:www-data /usr/lib/python2.7/dist-packages/geonode/uploaded
# collectstatic
django-admin collectstatic --settings=geonode.settings
# change apache entry to static_root
# line 21 change to static root
sudo vi /etc/apache2/sites-available/geonode
# bounce apache for good measure
sudo /etc/init.d/apache2 restart
#cp some shapefiles to your home dir to test upload
cp /usr/share/pyshared/django/contrib/gis/tests/data/interstates/* .
# test upload in browser

Change history (7)

comment:1 by kalxas, 10 years ago

Resolution: fixed
Status: newclosed

(In [10493]) trying to fix #1168

comment:2 by kalxas, 10 years ago

Resolution: fixed
Status: closedreopened

Trac should not close tickets automatically IMO

comment:3 by kalxas, 10 years ago

This is now fixed in [10502]

TODO: run the following in the after bringing up GeoServer (the way Cartaro does)

django-admin updatelayers --settings=geonode.settings --ignore-errors

comment:4 by kalxas, 10 years ago

GeoServer startup during build added in [10509]


  1. Add start/stop scripts to GeoNode and link on desktop.
  2. Create a group in XFCE menu to include GeoNode launchers.

comment:5 by kalxas, 10 years ago

start/stop scripts added in [10511]

comment:6 by kalxas, 10 years ago

Launchers confirmed to work in build 10513

Actually we now use curl in to detect if GeoServer is up, something that Cartaro could now use in their script too.

STAT=\`curl -s "http://localhost:8082/geoserver/ows" | grep 8082\`
if [ "\$STAT" = "" ]; then
    $GEOSERVER_PATH/bin/ &
    (sleep 2; echo "25"; sleep 2; echo "50"; sleep 2; echo "75"; sleep 2; echo "100") | zenity --progress --auto-close --text "GeoNode is starting GeoServer"
firefox http://geonode/

comment:7 by kalxas, 10 years ago

Resolution: fixed
Status: reopenedclosed

moving launcher group to another ticket

Note: See TracTickets for help on using tickets.