tags: - postgresql - 9.5 categories: - informational comments: true
compiled and package postgresql 9.5
Compare database backups:before and after.
#! /bin/bash
set -o pipefail
set -o nounset
set -o errexit
rm -rf /tmp/build
mkdir /tmp/build
rm -rf /tmp/bin
mkdir /tmp/bin
cd /tmp/build
wget https://www.openssl.org/source/openssl-1.0.2n.tar.gz
tar xzf openssl-1.0.2n.tar.gz
cd openssl-1.0.2n
./config --prefix=/tmp/bin/openssl -fPIC -shared
make
make install
cd /tmp/build
apt source libreadline-dev
cd readline6-6.3
./configure --prefix=/tmp/bin/libreadline
make
make install
cd /tmp/build
apt-get source postgresql-9.5
cd postgresql-9.5-9.5.25/
apt-get source postgresql-9.5
cd postgresql-9.5-9.5.25/
CFLAGS="-Wl,-rpath=/tmp/bin/openssl/lib,-rpath=/tmp/bin/libreadline/lib" \
./configure --prefix=/tmp/bin/pgsql \
--with-openssl \
--with-includes=/tmp/bin/openssl/include:/tmp/bin/libreadline/include \
--with-libraries=/tmp/bin/openssl/lib:/tmp/bin/libreadline/lib
make
make install
cp /lib/x86_64-linux-gnu/libtinfo.so.5 /tmp/bin/pgsql/lib
cd contrib
make
make install
cd /tmp/build
git clone https://github.com/Tarsnap/spiped.git
cd spiped/
CFLAGS="-I/tmp/bin/openssl/include -I/tmp/bin/libreadline/include" \
LDFLAGS="-L/tmp/bin/openssl/lib -L/tmp/bin/libreadline/lib" \
make
#md5sum /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /tmp/bin/lib/libcrypto.so.1.0.0
#f6cf59390dd79203fd2122a6d15ec0a5 /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
#f6cf59390dd79203fd2122a6d15ec0a5 /tmp/bin/lib/libcrypto.so.1.0.0
mkdir /tmp/bin/lib
cp /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /tmp/bin/lib/
tar -czf /tmp/pg95.tgz /tmp/bin