Skip to content

Instantly share code, notes, and snippets.

@teadur
Created March 23, 2017 12:02
Show Gist options
  • Save teadur/1b257022fd018888c5e9ed35d488df7f to your computer and use it in GitHub Desktop.
Save teadur/1b257022fd018888c5e9ed35d488df7f to your computer and use it in GitHub Desktop.
build-postgres-for-sensu-postgres-plugin
# Building Postgres on Debian against sensu embedded openssl to build pg/sensu-plugins-postgres gem(s)
# if you are missing build utils install them
#apt-get install build-essentials
apt-get install libreadline-dev
cd /usr/local
# you should download same or higher vrersion of postgres then you are running
wget https://ftp.postgresql.org/pub/source/v9.4.11/postgresql-9.4.11.tar.gz
tar -xf postgresql-9.4.11.tar.gz
cd /usr/local/postgresql-9.4.11
CFLAGS=-I/opt/sensu/embedded/include LDFLAGS=-L/opt/sensu/embedded/lib ./configure --prefix /opt/sensu/embedded --with-openssl
make
make install
/opt/sensu/embedded/bin/gem install pg
/opt/sensu/embedded/bin/gem install sensu-plugins-postgres
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment