[Live-demo] [OSGeo] #1168: Configure GeoNode to use postgis and fix permission problems

OSGeo trac_osgeo at osgeo.org
Mon Jul 22 17:11:50 PDT 2013


#1168: Configure GeoNode to use postgis and fix permission problems
----------------------------+-----------------------------------------------
 Reporter:  ingenieroariel  |       Owner:  live-demo@…              
     Type:  task            |      Status:  new                      
 Priority:  major           |   Milestone:  OSGeoLive7.0             
Component:  LiveDVD         |    Keywords:                           
----------------------------+-----------------------------------------------
 Jeff Johnson provided a guide in https://gist.github.com/jj0hns0n/6058788

 {{{
 # 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 local_settings.py
 cd /usr/lib/python2.7/dist-packages/geonode/
 sudo wget
 https://raw.github.com/GeoNode/geonode/master/geonode/local_settings.py.sample
 sudo mv local_settings.py.sample local_settings.py
 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 settings.py

 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
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/osgeo/ticket/1168>
OSGeo <http://www.osgeo.org/>
OSGeo committee and general foundation issue tracker.


More information about the Osgeolive mailing list