...
Requirements for installing MADlib:
- gcc and g++ (
- For
- OS X, Clang will work for compiling the source, but not for the documentation.
- NOTE: On on Ubuntu 16.04, you will need to use GCC 4 and not the default compiler (GCC 5) to run MADlib. Refer to MADLIB-1068 for details. The outstanding GCC 5 issue is being tracked under MADLIB-1145.
- An installed version of Greenplum Database 4.2+ or PostgreSQL (64-bit) 9.2+ with plpython support enabled.
- NOTE: plpython may not be enabled in Postgres by default.
- python 2.6 or 2.7
- python
- 3.x is not currently supported by MADlib.
- cmake (
- NOTE: the latest version of cmake might cause issues. Please try cmake 3.5.2 in case you get an error or a segmentation fault.
- NOTE: On Centos 6 (possibly other Linux variants), we have seen occasions where cmake will have issues running (seg fault) if the greenplum_path.sh file has been sourced prior to the cmake execution. If you encounter issues, you can use ldd on the cmake executable to confirm dynamic libraries are picked up from the Greenplum installation directories. If this is the case, start a new shell in which the greenplum_path.sh file is not sourced in your current running shell session. You can reference MADLIB-1093 for additional details.
- An installed version of Greenplum Database or PostgreSQL (64-bit) 9.2+ with plpython support enabled.
- NOTE: plpython may not be enabled in Postgres by default.
Installing MADlib
In the $MADLIB_ROOT
directory (location of the MADlib source) run the following commands:
Code Block | ||
---|---|---|
| ||
mkdir build
cd build
cmake ..
make -j8 # if this causes issues, switch back to a plan `make` |
Above, we built Above, we built the executables in the build
folder. This can, however, be any user-named folder (henceforth called $BUILD_ROOT
).
...
Deploy MADlib into the database with MADlib package manager madpack
located under $BUILD_ROOT/src/bin
.
Run the MADlib deployment utility to install MADlib into each database that you want to use it:
Postgres:
Code Block language bash $BUILD_ROOT/src/bin/madpack -s madlib –p postgres install
if environment variables are defined. Otherwise use a fully defined connection string:
Code Block language bash $BUILD_ROOT/src/bin/madpack -s madlib -p postgres -c [user[/password]@][host][:port][/database] install
Greenplum Database:
Code Block language bash $BUILD_ROOT/src/bin/madpack –p greenplum install
The above may need user/port/password setting depending on how the database has been configured.
To install:
Code Block language bash $BUILD_ROOT/src/bin/madpack -p postgres -c [user[/password]@][host][:port][/database] install
To make sure that the installation is successful:
Code Block language bash $BUILD_ROOT/src/bin/madpack -p postgres -c [user[/password]@][host][:port][/database] install-check
For more information on the usage of madpack:
Code Block language bash $BUILD_ROOT/src/bin/madpack --help
...