From d75d8f6783aad6f52e7c6db00b0f58b3187acced Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Tue, 24 Mar 2015 21:16:01 +0100 Subject: Added a script to install pyAggr3g470r on a server. --- documentation/deployment.rst | 6 ++---- install.sh | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 install.sh diff --git a/documentation/deployment.rst b/documentation/deployment.rst index 3aedbb60..6d1b119c 100644 --- a/documentation/deployment.rst +++ b/documentation/deployment.rst @@ -81,12 +81,9 @@ Deploying the application on a traditional server .. code-block:: bash - $ sudo apt-get install python libpq-dev python-dev python-pip build-essential git - $ sudo apt-get install libxml2-dev libxslt1-dev # for lxml $ git clone https://bitbucket.org/cedricbonhomme/pyaggr3g470r.git $ cd pyaggr3g470r - $ sudo pip install --upgrade -r requirements.txt - $ cp conf/conf.cfg-sample conf/conf.cfg + $ ./install.sh If you want to use PostgreSQL ''''''''''''''''''''''''''''' @@ -94,6 +91,7 @@ If you want to use PostgreSQL .. code-block:: bash $ sudo apt-get install postgresql postgresql-server-dev-9.3 postgresql-client + $ sudo pip install psycopg2 $ echo "127.0.0.1:5432:aggregator:pgsqluser:pgsqlpwd" > ~/.pgpass $ chmod 700 ~/.pgpass $ sudo -u postgres createuser pgsqluser --no-superuser --createdb --no-createrole diff --git a/install.sh b/install.sh new file mode 100644 index 00000000..8d62a0b6 --- /dev/null +++ b/install.sh @@ -0,0 +1,16 @@ +#! /usr/bin/env sh + +# +# This script install all dependencies for pyAggr3g470r. +# psycopg2 is removed from the requirements.txt file since it is only required +# if the user wants to use Postgres. Postgres is generally used on the Heroku +# platform. +# + +sudo apt-get install python libpq-dev python-dev python-pip build-essential git +sudo apt-get install libxml2-dev libxslt1-dev # for lxml + +sed -i '/psycopg2/d' requirements.txt +sudo pip install --upgrade -r requirements.txt + +cp conf/conf.cfg-sample conf/conf.cfg -- cgit