Skip to content
agorajek edited this page Jan 16, 2011 · 20 revisions

Greenplum:

These instructions assume you have Greenplum database in $GPHOME, and a gpadmin user account with sudo privileges.

  1. Make sure you have Python setuptools installed. Log into your gpadmin account, source greenplum_path.sh, and do the following:
     cd /tmp
     wget http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11-py2.6.egg#md5=bfa92100bd772d5a213eedd356d64086
     sh setuptools-0.6c11-py2.6.egg

Note: If you are on a Mac you are probably missing WGET. In that case just copy the http... link to your browser and download setuptools. Then CD to the download directory and repeat sh setuptools-0.6c11-py2.6.egg.

  1. Install python libraries used by the madlib installer.
     export CFLAGS="-L$GPHOME/ext/python/lib/ -L$GPHOME/lib/"
     $GPHOME/ext/python/bin/easy_install argparse hashlib pyyaml sqlparse 
  1. Download and uncompress madlib-contrib repository from https://github.com/madlib/madlib-contrib/archives/master or use git to clone it from git@github.com:madlib/madlib-contrib.git.

  2. Change directory to the madlib-contrib root and edit the madpy/Config.yml file to reflect your installation. Review all parameters:

     vi madpy/Config.yml
  1. From the madlib-contrib directory run the Python install command:
     python setup.py install
  1. Make sure your database and schema (target_schema) designated for Config.yml are MADlib ready:
  • If the database does not exist, create it:
     $ createdb <database_name>
  • Create target_schema:
     psql> CREATE SCHEMA <your_madlib_schema>;  
  • Create target_schema:
     psql> CREATE LANGUAGE plpgsql;  
     psql> CREATE LANGUAGE plpythonu;  

Clone this wiki locally