pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: sundip.tailor@gmail.com
Subject: Building from source using clean Ubuntu docker container
Date: Thu, 23 May 2024 10:10:53 +0000
Message-ID: <171645905337.2021730.679031210652169512@wrigleys.postgresql.org> (raw)

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/16/install-make.html
Description:

Hello there,

Below are complete steps for building Postgres from source in a clean docker
ubuntu container. 

Maybe this is useful for your docs? I noticed the 'Chapter 17. Installation
from Source Code' doesn't discuss many common dependency issues like ICU and
Zlib. 

If you would like a write up, I can contribute.

Thanks,
Sundip

STEPS:
docker pull ubuntu
docker run --rm -it --entrypoint bash ubuntu

apt update && apt upgrade
apt install build-essential
apt install sudo
apt install git
apt install pkg-config
apt install libicu-dev
apt install bison
apt install flex
apt install libreadline-dev
apt install zlib1g-dev

adduser postgres
usermod -aG sudo postgres
git clone https://git.postgresql.org/git/postgresql.git
./configure
make
sudo make install 
sudo mkdir -p /usr/local/pgsql/data
sudo chown postgres /usr/local/pgsql/data
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test


Message-ID: <171645905337.2021730.679031210652169512@wrigleys.postgresql.org>
Permalink:  ../171645905337.2021730.679031210652169512@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/171645905337.2021730.679031210652169512@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-docs@lists.postgresql.org, sundip.tailor@gmail.com
  Subject: Re: Building from source using clean Ubuntu docker container
  In-Reply-To: <171645905337.2021730.679031210652169512@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox