-
Notifications
You must be signed in to change notification settings - Fork 1
Install Geoanalytics
This is a first draft of an install document. This has been tested to work on our local environments, but it is not yet a robust install system. If you are interested in making the install process more robust, please contact the developers and let us know! These instructions assume you will install Geoanalytics in your home directory on a machine running Ubuntu Linux. Geoanalytics can be installed on RedHat, but the install process is more manual.
We make a number of assumptions. First, Geoanalytics is a Mezzanine project, and that means it's a full Django project and not merely a Django app. This means that any apps you develop will find their way into the Geoanalytics project container or be communicated with over a web API. Second, we assume you're not using your system's Redis installation for anything but Geoanalytics. If this is not the case, see the redis connections made inside settings.py and change them to suit your system.
git clone https://github.com/JeffHeard/ga_cms.git
You will need root for this. Packages should install and just work, but it's possible that a few things won't. If that happens, please install manually and send a note to the developer with the changes you had to make and we will update the documentation.
cd ga_cms
sh requirements/kickstart.ubuntu
wget https://github.com/mapnik/mapnik/archive/v2.1.0.tar.gz
tar xvzf mapnik-2.1.0.tar.gz
cd mapnik-2.1.0/
./configure
make
sudo make install
After installing Carto, update Django's settings.py and change CARTO_HOME to the place where the carto's carto/bin/ directory resides.
git clone https://github.com/mapnik/carto
cd carto
make
cd ~
virtualenv --system-site-packages --distribute geoanalytics
cd geoanalytics/
source bin/activate [use this step in the future to jump into the virtual env.]
cd ga_cms sh install.sh
see https://docs.djangoproject.com/en/dev/ref/contrib/gis/install/postgis/
sudo su - postgres
createuser geoanalytics
Say yes to the folowing questions
Shall the new role be a superuser? (y/n) n Shall the new role be allowed to create databases? (y/n) y Shall the new role be allowed to create more new roles? (y/n) n
psql
alter user postgres encrypted password 'YOURSECRETPASSWORD';
alter user geoanalytics encrypted password 'YOUROTHERSECRETPASSWORD';
\q
createdb geoanalytics
psql geoanalytics
CREATE EXTENSION postgis;
CREATE EXTENSION postgis_topology;
The above won't work and you will see an error such as:
ERROR: could not open extension control file "/usr/share/postgresql/9.1/extension/postgis.control": No such file or directory
In this case, create a template postgis database:
sudo su - postgres
sh requirements/create_template_postgis-debian.sh (or use another script from: https://docs.djangoproject.com/en/dev/ref/contrib/gis/install/postgis/)
createdb -T template_postgis geoanalytics
"ENGINE": "django.contrib.gis.db.backends.postgresql_psycopg2" "NAME": "geoanalytics" "USER": "geoanalytics" "PASSWORD": "YOUROTHERSECRETPASSWORD"
python manage.py syncdb
Say yes when prompted to create a Django superuser
python manage.py migrate
python manage.py runserver
python manage.py celery worker