Saturday, January 28, 2017

Install postgresql from source an Raspberry Pi 3 Debian Jessie

Reference: https://www.postgresql.org/docs/current/static/installation.html

sudo -i
cd /usr/src/
wget https://ftp.postgresql.org/pub/source/v9.6.1/postgresql-9.6.1.tar.bz2
tar xf postgresql-9.6.1.tar.bz2
cd postgresql-9.6.1
apt-get install -y libreadline-dev libperl-dev libpython-dev libxml2-dev libssl-dev
# become non-root user
exit
./configure --with-python --with-perl --with-openssl --with-libxml --enable-debug

make
su -i
make install
useradd -M postgres
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data > /tmp/postgres_logfile 2>&1 &
/usr/local/pgsql/bin/createdbkafka_user
/usr/local/pgsql/bin/psqlkafka_user

Feel free to add that path (export PATH=$PATH:/usr/local/pgsql/bin/) to your .bashrc.

No comments:

Post a Comment