Skip to content

Instantly share code, notes, and snippets.

@tqyq
Forked from jvawdrey/madlib-postgres-ubuntu.md
Last active April 19, 2023 09:04
Show Gist options
  • Save tqyq/955fcf2e505894d59db6b0e771cfe3e8 to your computer and use it in GitHub Desktop.
Save tqyq/955fcf2e505894d59db6b0e771cfe3e8 to your computer and use it in GitHub Desktop.
Instructions for installing MADlib and Postgres on Ubuntu 16.04

madlib-postgres-ubuntu

Instructions for installing MADlib and Postgres on Ubuntu 16.04

# Install Postgres 9.6, pl/r and dependencies for MADlib
sudo apt-get install -y cmake postgresql-9.6 postgresql-server-dev-9.6 postgresql-plpython-9.6 postgresql-9.6-plr libkrb5-dev postgresql-client postgresql-contrib

# grab madlib rpm
cd /home/gpadmin/tmp
wget "http://tqyq.datahunter.cn/postgres/apache-madlib-1.12-bin-Linux.rpm"

# install ubuntu package alien
apt-get install -y alien

# convert madlib rpm to deb
alien apache-madlib-1.12-bin-Linux.rpm --scripts

# run deb
dpkg -i apache-madlib-1.12-bin-Linux.deb

# setup username and password
sudo -u postgres psql postgres
\password postgres
\q

# add languages to postgres
sudo -u postgres psql postgres
psql
CREATE EXTENSION plpythonu;
CREATE EXTENSION plr;
\q

# run madpack
/usr/local/madlib/bin/madpack -p postgres -c postgres@localhost:5432/postgres install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment