-
Notifications
You must be signed in to change notification settings - Fork 2
Set Up and install
jtellis edited this page Jan 29, 2015
·
8 revisions
####GitHub Repos
The new version of RI Community-Profiles is:
- ProvidencePlan/Profiles
The installation instructions were created for an Ubuntu system
####Installation
Install Necessary System Packages
sudo apt-get install git postgresql-9.3 python-dev python-pip python-virtualenv nginx gunicorn supervisor libpq-dev postgresql-9.3-postgis-2.1 postgresql-contrib
Install Redis
- http://redis.io/topics/quickstart
- http://vvv.tobiassjosten.net/linux/installing-redis-on-ubuntu-with-apt/
Install and Setup PostgreSQL Database
- https://help.ubuntu.com/lts/serverguide/postgresql.html
sudo -u postgres createuser -S -D -R -P -E communityprofilessudo -u postgres createdb -O communityprofiles communityprofiles -E utf-8
Add System User for Application
sudo adduser communityprofiles
Install PostGIS2.0 or later
Switch User
sudo su - communityprofiles
Clone ProvidencePlan/Profiles repo.
git clone git@github.com:ProvidencePlan/Profiles.git
Create a virtual environment
virtualenv ENVsource ENV/bin/activate
Install requirements
cd Profiles/communityprofiles/pip install -r requirements.txt
Copy and rename “local_settings.example.py” to “local_settings.py”
cp local_settings.example.py local_settings.py
Add Census API Key to Local Settings
- See http://api.census.gov/data/key_signup.html
- Update key info in “local_settings.py”.
- Ex.
CENSUS_API_KEY = 'key'
Prepare Application Database
./bootstrap_app.sh
Load geographies
- You can find sample data in
/census/tools/sample_data/ - Ex.
./manage.py load_geographies census/tools/sample_data/pageo2010.sample.sf1 2010 - For help run
./manage.py load_geographies --help - Geographies are created based on what is defined in local_settings SUM_LEVS
Run the Profiles api binary from the bin dir
- configure the profiles api settings file to use your database and redis connection *./profiles_api settings.example.json :8080