Thread: Install PostgreSQL 17 by rpm

Install PostgreSQL 17 by rpm

From
Loles Ferrándiz DBA
Date:
Greetings to all.

I wanted to ask if there is a way to install PostgreSQL packages on Linux without an Internet connection, that is, whether to use the repositories.

There are clients who do not want to enable Internet access on their servers and I need to install PostgreSQL from packages with rpm.

I would appreciate help on this.

Re: Install PostgreSQL 17 by rpm

From
Peter Gram
Date:
Hi Loles

Here 1) is how to install Enterprise EDB postgres from a local repository. 
If you use this formula on postgres from postgrs.org it should work :-) 



Med venlig hilsen

Peter Gram
Sæbyholmsvej 18 
2500 Valby

Mobile: (+45) 5374 7107



On Wed, 26 Feb 2025 at 13:08, Loles Ferrándiz DBA <lolesferrandizdba@gmail.com> wrote:
Greetings to all.

I wanted to ask if there is a way to install PostgreSQL packages on Linux without an Internet connection, that is, whether to use the repositories.

There are clients who do not want to enable Internet access on their servers and I need to install PostgreSQL from packages with rpm.

I would appreciate help on this.

Re: Install PostgreSQL 17 by rpm

From
Loles Ferrándiz DBA
Date:
Thanks Peter but customers prefer that PostgreSQL community version has installed. This is possible?

On Wed, Feb 26, 2025 at 1:18 PM Peter Gram <peter.m.gram@gmail.com> wrote:
Hi Loles

Here 1) is how to install Enterprise EDB postgres from a local repository. 
If you use this formula on postgres from postgrs.org it should work :-) 



Med venlig hilsen

Peter Gram
Sæbyholmsvej 18 
2500 Valby

Mobile: (+45) 5374 7107



On Wed, 26 Feb 2025 at 13:08, Loles Ferrándiz DBA <lolesferrandizdba@gmail.com> wrote:
Greetings to all.

I wanted to ask if there is a way to install PostgreSQL packages on Linux without an Internet connection, that is, whether to use the repositories.

There are clients who do not want to enable Internet access on their servers and I need to install PostgreSQL from packages with rpm.

I would appreciate help on this.

Re: Install PostgreSQL 17 by rpm

From
Peter Gram
Date:
Hi Loles

This manual gives you all the commands needed. You just use them against the PostgreSQL community.

Med venlig hilsen

Peter Gram
Sæbyholmsvej 18 
2500 Valby

Mobile: (+45) 5374 7107



On Wed, 26 Feb 2025 at 13:47, Loles Ferrándiz DBA <lolesferrandizdba@gmail.com> wrote:
Thanks Peter but customers prefer that PostgreSQL community version has installed. This is possible?

On Wed, Feb 26, 2025 at 1:18 PM Peter Gram <peter.m.gram@gmail.com> wrote:
Hi Loles

Here 1) is how to install Enterprise EDB postgres from a local repository. 
If you use this formula on postgres from postgrs.org it should work :-) 



Med venlig hilsen

Peter Gram
Sæbyholmsvej 18 
2500 Valby

Mobile: (+45) 5374 7107



On Wed, 26 Feb 2025 at 13:08, Loles Ferrándiz DBA <lolesferrandizdba@gmail.com> wrote:
Greetings to all.

I wanted to ask if there is a way to install PostgreSQL packages on Linux without an Internet connection, that is, whether to use the repositories.

There are clients who do not want to enable Internet access on their servers and I need to install PostgreSQL from packages with rpm.

I would appreciate help on this.

Re: Install PostgreSQL 17 by rpm

From
Loles Ferrándiz DBA
Date:
Ok, thank you very much!

On Wed, Feb 26, 2025 at 2:04 PM Peter Gram <peter.m.gram@gmail.com> wrote:
Hi Loles

This manual gives you all the commands needed. You just use them against the PostgreSQL community.

Med venlig hilsen

Peter Gram
Sæbyholmsvej 18 
2500 Valby

Mobile: (+45) 5374 7107



On Wed, 26 Feb 2025 at 13:47, Loles Ferrándiz DBA <lolesferrandizdba@gmail.com> wrote:
Thanks Peter but customers prefer that PostgreSQL community version has installed. This is possible?

On Wed, Feb 26, 2025 at 1:18 PM Peter Gram <peter.m.gram@gmail.com> wrote:
Hi Loles

Here 1) is how to install Enterprise EDB postgres from a local repository. 
If you use this formula on postgres from postgrs.org it should work :-) 



Med venlig hilsen

Peter Gram
Sæbyholmsvej 18 
2500 Valby

Mobile: (+45) 5374 7107



On Wed, 26 Feb 2025 at 13:08, Loles Ferrándiz DBA <lolesferrandizdba@gmail.com> wrote:
Greetings to all.

I wanted to ask if there is a way to install PostgreSQL packages on Linux without an Internet connection, that is, whether to use the repositories.

There are clients who do not want to enable Internet access on their servers and I need to install PostgreSQL from packages with rpm.

I would appreciate help on this.

Re: Install PostgreSQL 17 by rpm

From
Ron Johnson
Date:
On Wed, Feb 26, 2025 at 7:08 AM Loles Ferrándiz DBA <lolesferrandizdba@gmail.com> wrote:
Greetings to all.

I wanted to ask if there is a way to install PostgreSQL packages on Linux without an Internet connection, that is, whether to use the repositories.

There are clients who do not want to enable Internet access on their servers and I need to install PostgreSQL from packages with rpm.

I'm in the exact same situation.  Thus, I directly download the relevant RPM packages to my laptop, then scp them to a "version subdirectory" on the Linux hosts.
"sudo yum install PGx.y_RHELz/*rpm" installs them.

These are the PowerShell commands which I used a few days ago to download the PG 16.8 packages for RHEL9.  Add or remove packages, change to RHEL8, or even RHEL7 as you see fit.  Some version numbers will though.

$RHRelInFile='rhel9'
$RHRelInURL='rhel-9'
$RHRelInURL2=$RHRelInURL
$PgMajorVer='16'
$PGVer="${PgMajorVer}.8"
$PGDGv1="1PGDG"
$PGDGv4="4PGDG"
function Get-RPM
{
    $site = $args[0]
    $f = $args[1]
    write-host $site$f
    wget $site$f -outfile $f
}
$PathRoot=$env:USERPROFILE+'\Documents\Database Installers\Postgresql\'
$CurPath=$PathRoot+'Pg'+$PGVer+'_'+$RHRelInFile.ToUpper()
If(!(test-path -PathType container $CurPath))
{
    New-Item -Path $CurPath -ItemType Directory
}
Set-Location -Path $CurPath
$page="https://download.postgresql.org/pub/repos/yum/common/redhat/${RHRelInURL2}-x86_64/"
get-RPM $page "check_postgres-2.25.0-3.${RHRelInFile}.noarch.rpm"
get-RPM $page "pgbackrest-2.54.2-${PGDGv1}.${RHRelInFile}.x86_64.rpm"
get-RPM $page "pgcluu-4.0-${PGDGv1}.${RHRelInFile}.noarch.rpm"
$page="https://download.postgresql.org/pub/repos/yum/${PgMajorVer}/redhat/${RHRelInURL}-x86_64/"
get-RPM $page "pg_repack_${PgMajorVer}-1.5.2-${PGDGv1}.${RHRelInFile}.x86_64.rpm"
get-RPM $page "pgaudit_${PgMajorVer}-16.0-${PGDGv1}.${RHRelInFile}.x86_64.rpm"  
get-RPM $page "plpgsql_check_${PgMajorVer}-2.7.8-${PGDGv1}.${RHRelInFile}.x86_64.rpm"
get-RPM $page "plsh_${PgMajorVer}-1.20220917-${PGDGv4}.${RHRelInFile}.x86_64.rpm"
get-RPM $page "postgresql${PgMajorVer}-${PGVer}-${PGDGv1}.${RHRelInFile}.x86_64.rpm"
get-RPM $page "postgresql${PgMajorVer}-contrib-${PGVer}-${PGDGv1}.${RHRelInFile}.x86_64.rpm"
get-RPM $page "postgresql${PgMajorVer}-docs-${PGVer}-${PGDGv1}.${RHRelInFile}.x86_64.rpm"
get-RPM $page "postgresql${PgMajorVer}-libs-${PGVer}-${PGDGv1}.${RHRelInFile}.x86_64.rpm"
get-RPM $page "postgresql${PgMajorVer}-plperl-${PGVer}-${PGDGv1}.${RHRelInFile}.x86_64.rpm"
get-RPM $page "postgresql${PgMajorVer}-plpython3-${PGVer}-${PGDGv1}.${RHRelInFile}.x86_64.rpm"
get-RPM $page "postgresql${PgMajorVer}-server-${PGVer}-${PGDGv1}.${RHRelInFile}.x86_64.rpm"

--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!