Skip to content

Instantly share code, notes, and snippets.

@jj0hns0n
Last active December 20, 2015 02:49
Show Gist options
  • Save jj0hns0n/6058788 to your computer and use it in GitHub Desktop.
Save jj0hns0n/6058788 to your computer and use it in GitHub Desktop.
# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment