...
- Download the MADlib binary
- For Postgres: use either the OSX or Linux binary from the MADlib download page
- For Greenplum: download the .gppkg binary from the Greenplum Advanced Analytics Group in Pivotal Network (NOTE: anybody can easily create an account on Pivotal Network and download the .gppkg)
- Install the package.
- Postgres:
- on OSX double click the installer package
on Redhat / CentOS run the following as root:
Code Block yum install <madlib_package> --nogpgcheck
or
Code Block language bash rpm -i <madlib_package>
Greenplum:
on Redhat / CentOS run the following as gpadmin:
Code Block language bash gppkg -i <madlib_package>
- NOTE: if you are using an rpm package on a CentOS 5 system, please add --no-deps flag to the command.
- Postgres:
- Ensure that the environment is setup for your database deployment and that the database is up and running.
Ensure that psql, postgres, and pg_config are in your path
Code Block language bash which psql postgres pg_config
Ensure that the database is started and running
Code Block language bash psql -c 'select version()'
The above may need user/port/password setting depending on how the database has been configured.
- Run the MADlib deployment utility to install MADlib into each database that you want to use it:
Postgres:
Code Block language bash /usr/local/madlib/bin/madpack -s madlib –p postgres install
if environment variables are defined. Otherwise use a fully defined connection string:
Code Block language bash /usr/local/madlib/bin/madpack -s madlib -p postgres -c [user[/password]@][host][:port][/database] install
Greenplum Database:
Code Block language bash /usr/local/madlib/bin/madpack –p greenplum install
The above may need user/port/password setting depending on how the database has been configured.
Run the MADlib madpack deployment utility to install MADlib into each database that you want to use it in:
After installation gpadmin should grant all privileges on schema madlib to users who will be accessing MADlib functions. Otherwise, users will get "ERROR: permission denied for schema MADlib." Also, install checks (see next step below) will fail if CREATE TEMP TABLE privileges are not granted on the schema where MADlib is installed. See the PostgreSQL docs for information on schemas and privileges.
Test your installation
...