Skip to content

Instantly share code, notes, and snippets.

@jj0hns0n jj0hns0n/gist:6058788
Last active Dec 20, 2015

What would you like to do?
# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.