Skip to content
Sujit Philip edited this page May 17, 2013 · 33 revisions

Installing MADlib

Single Node: Greenplum >= 4.0 or PostgreSQL >= 8.4

  1. Download the MADlib binary installation package that is appropriate for your version of Greenplum or PostgreSQL:

    In the following, we will use $MADLIB_PACKAGE as a placeholder for the downloaded file.

  2. Start the MADlib installation.

    NOTE: If you already have MADlib installed on this machine this step will overwrite your previous MADlib binaries. If you would like to install it to a different location read the "Installing Multiple Versions of MADlib" section below.

    • Mac OS X: Double click on the installer package

    • RedHat /CentOS Linux: Run the following as root:

        yum install $MADLIB_PACKAGE --nogpgcheck
      
  3. Make sure the MADlib in-database registration utility (madpack) will be able to locate your database installation:

    • For Greenplum, run source /path/to/greenplum/greenplum_path.sh
    • For PostgreSQL, make sure that psql is in PATH.
  4. Register MADlib in your database (for example: $DBMS=greenplum, $HOST=localhost:5432, $DATABASE=testdb, $USER=gpadmin):

    /usr/local/madlib/bin/madpack -p $DBMS -c $USER@$HOST/$DATABASE install
    

    For PostgreSQL, use $DBMS=postgres instead.

  5. To test your installation you can run the install check procedure:

    /usr/local/madlib/bin/madpack -p $DBMS -c $USER@$HOST/$DATABASE install-check
    

Multi-Node Cluster: Greenplum >= 4.0 on RedHat / CentOS Linux

Follow the single-node installation, except in step 2 run the following steps (2.1 and 2.2) instead:

2.1. Copy the installation package to the segment nodes:

  gpscp -f seg_host_file $MADLIB_PACKAGE "=:$(pwd)"

2.2. Run the following as root to perform the installation on all nodes: (the below example uses MADlib v0.6 as a example. Substitute 0.6 with the version you wish to install)

  gpssh -f seg_host_file << EOF
     cd "$(pwd)"
     yum install madlib-0.6-Linux.rpm --nogpgcheck
  EOF

Other operating systems

Install from source as described in Building MADlib from Source.

Installing Multiple Versions of MADlib

To install another MADlib package (of any version) on a system with an existing MADlib installation, follow these hints:

  • For full control, install from source and adjust the CMAKE_INSTALL_PREFIX build setting, e.g.

    ./configure -DCMAKE_INSTALL_PREFIX=/other/directory

    See Building MADlib from Source for details.

  • You can install the MADlib RPM into a custom directory using the --relocate parameter. E.g.,

    rpm -i MADlib-ver_XYZ.rpm --relocate /usr/local=/other/directory

  • When registering a MADlib version in your database (step 4 above), call /other/directory/madlib/bin/madpack instead.

Clone this wiki locally