pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedHow to install PostgreSQL binaries on a different directory than the default one
3+ messages / 3 participants
[nested] [flat]
* How to install PostgreSQL binaries on a different directory than the default one
@ 2021-04-02 22:01 Allie Crawford <CrawfordMA@ChurchofJesusChrist.org>
2021-04-03 00:25 ` Re: How to install PostgreSQL binaries on a different directory than the default one rob stone <floriparob@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Allie Crawford @ 2021-04-02 22:01 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Hi,
I am new in postgresql and I am trying to install PostgreSQL on Linux server but instead of using the default location for the binaries I want to install them in a different directory.
I have research for a while and I cannot find any information on how to do that using the dnf utility which is what the PostgreSQL website gives me as instruction when I go the download page.
I have a directory called /pg01 that I want to use to install the binaries. The postgreSQL download site (https://www.postgresql.org/download/linux/redhat/ ) gives me the following steps to install the binaries:
Steps to install postgresql 13
sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rp...
sudo dnf -qy module disable postgresql
sudo dnf install -y postgresql13-server
sudo /usr/pgsql-13/bin/postgresql-13-setup initdb
sudo systemctl enable postgresql-13
sudo systemctl start postgresql-13
That set of instructions shown right above, installs the binaries under the /usr/pgsql-13, and what I want is to install the binaries under /pg01 instead of /usr.
My question is, what are the changes I need to do in the instructions detailed right above, so that I can get the binary installation under the /pg01 directory instead of the default /usr directory.
Thanks in advance for any help you can five me on this.
Regards,
Allie
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: How to install PostgreSQL binaries on a different directory than the default one
2021-04-02 22:01 How to install PostgreSQL binaries on a different directory than the default one Allie Crawford <CrawfordMA@ChurchofJesusChrist.org>
@ 2021-04-03 00:25 ` rob stone <floriparob@gmail.com>
2021-04-03 00:46 ` Re: How to install PostgreSQL binaries on a different directory than the default one Benedict Holland <benedict.m.holland@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: rob stone @ 2021-04-03 00:25 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
Hello,
On Fri, 2021-04-02 at 22:01 +0000, Allie Crawford wrote:
> Hi,
> I am new in postgresql and I am trying to install PostgreSQL on Linux
> server but instead of using the default location for the binaries I
> want to install them in a different directory.
> I have research for a while and I cannot find any information on how
> to do that using the dnf utility which is what the PostgreSQL website
> gives me as instruction when I go the download page.
>
> I have a directory called /pg01 that I want to use to install the
> binaries. The postgreSQL download site (
> https://www.postgresql.org/download/linux/redhat/ ) gives me the
> following steps to install the binaries:
>
>
> That set of instructions shown right above, installs the binaries
> under the/usr/pgsql-13, and what I want is to install the binaries
> under /pg01 instead of /usr.
> My question is, what are the changes I need to do in the instructions
> detailed right above, so that I can get the binary installation under
> the /pg01 directory instead of the default /usr directory.
>
> Thanks in advance for any help you can five me on this.
>
> Regards,
> Allie
Most Linux distros keep the binaries by major version. So when you
install version 14 it will go into /usr/pgsql-14.
Thus, by using different port numbers you can run multiple versions on
the same box.
Useful for development, QA, etc.
HTH,
Robert
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: How to install PostgreSQL binaries on a different directory than the default one
2021-04-02 22:01 How to install PostgreSQL binaries on a different directory than the default one Allie Crawford <CrawfordMA@ChurchofJesusChrist.org>
2021-04-03 00:25 ` Re: How to install PostgreSQL binaries on a different directory than the default one rob stone <floriparob@gmail.com>
@ 2021-04-03 00:46 ` Benedict Holland <benedict.m.holland@gmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: Benedict Holland @ 2021-04-03 00:46 UTC (permalink / raw)
To: rob stone <floriparob@gmail.com>; +Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Why not use the docker container?
Thanks,
Ben
On Fri, Apr 2, 2021, 8:25 PM rob stone <floriparob@gmail.com> wrote:
> Hello,
>
> On Fri, 2021-04-02 at 22:01 +0000, Allie Crawford wrote:
> > Hi,
> > I am new in postgresql and I am trying to install PostgreSQL on Linux
> > server but instead of using the default location for the binaries I
> > want to install them in a different directory.
> > I have research for a while and I cannot find any information on how
> > to do that using the dnf utility which is what the PostgreSQL website
> > gives me as instruction when I go the download page.
> >
> > I have a directory called /pg01 that I want to use to install the
> > binaries. The postgreSQL download site (
> > https://www.postgresql.org/download/linux/redhat/ ) gives me the
> > following steps to install the binaries:
> >
> >
> > That set of instructions shown right above, installs the binaries
> > under the/usr/pgsql-13, and what I want is to install the binaries
> > under /pg01 instead of /usr.
> > My question is, what are the changes I need to do in the instructions
> > detailed right above, so that I can get the binary installation under
> > the /pg01 directory instead of the default /usr directory.
> >
> > Thanks in advance for any help you can five me on this.
> >
> > Regards,
> > Allie
>
> Most Linux distros keep the binaries by major version. So when you
> install version 14 it will go into /usr/pgsql-14.
> Thus, by using different port numbers you can run multiple versions on
> the same box.
> Useful for development, QA, etc.
>
> HTH,
> Robert
>
>
>
>
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2021-04-03 00:46 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-04-02 22:01 How to install PostgreSQL binaries on a different directory than the default one Allie Crawford <CrawfordMA@ChurchofJesusChrist.org>
2021-04-03 00:25 ` rob stone <floriparob@gmail.com>
2021-04-03 00:46 ` Benedict Holland <benedict.m.holland@gmail.com>
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