Created
November 28, 2014 08:17
-
-
Save repeatedly/d4c9f9084f321f5a95e3 to your computer and use it in GitHub Desktop.
pg gem installation script for td-agent 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install -y build-essential | |
sudo apt-get build-dep -y postgresql | |
wget http://ftp.postgresql.org/pub/source/v9.2.8/postgresql-9.2.8.tar.gz | |
tar -zxvf postgresql-9.2.8.tar.gz | |
cd postgresql-9.2.8 | |
export MAJOR_VER=9.2 | |
./configure \ | |
--prefix=/opt/td-agent/embedded \ | |
--mandir=/opt/td-agent/embedded/share/postgresql/${MAJOR_VER}/man \ | |
--docdir=/opt/td-agent/embedded/share/doc/postgresql-doc-${MAJOR_VER} \ | |
--sysconfdir=/etc/postgresql-common \ | |
--datarootdir=/opt/td-agent/embedded/share/ \ | |
--datadir=/opt/td-agent/embedded/share/postgresql/${MAJOR_VER} \ | |
--bindir=/opt/td-agent/embedded/lib/postgresql/${MAJOR_VER}/bin \ | |
--libdir=/opt/td-agent/embedded/lib/ \ | |
--libexecdir=/opt/td-agent/embedded/lib/postgresql/ \ | |
--includedir=/opt/td-agent/embedded/include/postgresql/ \ | |
--enable-nls \ | |
--enable-integer-datetimes \ | |
--enable-thread-safety \ | |
--enable-debug \ | |
--with-gnu-ld \ | |
--with-pgport=5432 \ | |
--with-openssl \ | |
--with-libedit-preferred \ | |
--with-includes=/opt/td-agent/embedded/include \ | |
--with-libs=/opt/td-agent/embedded/lib | |
make | |
sudo make install | |
sudo /usr/sbin/td-agent-gem install --no-document pg -- --with-pg-config=/opt/td-agent/embedded/lib/postgresql/9.2/bin/pg_config |
I could install fluent-plugin-redshift v0.0.4 by the following modify.
- sudo /usr/sbin/td-agent-gem install --no-document pg -- --with-pg-config=/opt/td-agent/embedded/lib/postgresql/9.2/bin/pg_config
+ sudo /usr/sbin/td-agent-gem install --no-document pg -v 0.17 -- --with-pg-config=/opt/td-agent/embedded/lib/postgresql/9.2/bin/pg_config
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Based on this gist: https://gist.github.com/jtimberman/3954641