...
- 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 which postgres which 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.
HDB/HAWQ:
Code Block language bash /usr/local/madlib/bin/madpack –p hawq install
The above may need user/port/password setting depending on how the database has been configured.
For more information on madpack:
Code Block language bash /usr/local/madlib/bin/madpack --help
Help output for madpack is also attached to this wiki page for your reference.
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 installationPlease note that if the optimizer_control GUC is set to off, this can certain install checks to fail. This is because some install checks turn the optimizer on or off for efficiency reasons. However, this does not mean there is any problem with the installation.
Postgres:
Code Block language bash /usr/local/madlib/bin/madpack -s madlib –p postgres install-check
Greenplum Database:
Code Block language bash /usr/local/madlib/bin/madpack –p greenplum install-check
The above may need user/port/password setting depending on how the database has been configured.
Please note that if the optimizer_control GUC is set to off in Greenplum, this can certain install checks to fail. This is because some install checks turn the optimizer on or off for efficiency reasons. However, this does not mean there is any problem with the installation.HDB/HAWQ:
Code Block language bash /usr/local/madlib/bin/madpack –p hawq install-check
The above may need user/port/password setting depending on how the database has been configured.
...