Thread: PostgreSQL 11 with SSL on Linux
Can someone tell me if there is a yum version of PostgreSQL 11 that can be installed on Linux that has SSL enabled? Currently the only way I have gotten SSL turned on in PostgreSQL is by doing the following commands:
- tar xzvf /tmp/postgresql-11.2.tar.gz -C /data
- mv /data/postgresql-11.2 /data/pgsql
- cd /data/pgsql
- ./configure --prefix=/data/pgsql --without-readline --without-zlib --with-openssl >> conf.log
- make
- make install
Thanks
On Thu, Jun 4, 2020 at 5:01 PM Susan Joseph <sandajoseph@verizon.net> wrote:
Can someone tell me if there is a yum version of PostgreSQL 11 that can be installed on Linux that has SSL enabled? Currently the only way I have gotten SSL turned on in PostgreSQL is by doing the following commands:
- tar xzvf /tmp/postgresql-11.2.tar.gz -C /data
- mv /data/postgresql-11.2 /data/pgsql
- cd /data/pgsql
- ./configure --prefix=/data/pgsql --without-readline --without-zlib --with-openssl >> conf.log
- make
- make install
All the PostgreSQL versions available om yum from the postgresql.org site have SSL enabled. Just install using the instructions from https://www.postgresql.org/download/.
So the other issue I have is that I am running this on a server that is not connected to the Internet. So I have downloaded the RPM file but I can't figure out how to install it without it trying to access files on the Internet. Are there other libraries I need to include in my download for this to work on a non-networked server?
-----Original Message-----
From: Magnus Hagander <magnus@hagander.net>
To: Susan Joseph <sandajoseph@verizon.net>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Sent: Thu, Jun 4, 2020 11:14 am
Subject: Re: PostgreSQL 11 with SSL on Linux
--
From: Magnus Hagander <magnus@hagander.net>
To: Susan Joseph <sandajoseph@verizon.net>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Sent: Thu, Jun 4, 2020 11:14 am
Subject: Re: PostgreSQL 11 with SSL on Linux
On Thu, Jun 4, 2020 at 5:01 PM Susan Joseph <sandajoseph@verizon.net> wrote:
Can someone tell me if there is a yum version of PostgreSQL 11 that can be installed on Linux that has SSL enabled? Currently the only way I have gotten SSL turned on in PostgreSQL is by doing the following commands:
- tar xzvf /tmp/postgresql-11.2.tar.gz -C /data
- mv /data/postgresql-11.2 /data/pgsql
- cd /data/pgsql
- ./configure --prefix=/data/pgsql --without-readline --without-zlib --with-openssl >> conf.log
- make
- make install
All the PostgreSQL versions available om yum from the postgresql.org site have SSL enabled. Just install using the instructions from https://www.postgresql.org/download/.
Susan Joseph <sandajoseph@verizon.net> writes: > So the other issue I have is that I am running this on a server that is not connected to the Internet. So I have downloadedthe RPM file but I can't figure out how to install it without it trying to access files on the Internet. Are thereother libraries I need to include in my download for this to work on a non-networked server? Are you using the right install tool? "rpm -i" shouldn't result in any nonlocal accesses. Tools like yum or dnf will, because they're meant to fetch from nonlocal repositories. regards, tom lane
So when I run rpm -i it says that the package is installed, but I can't find a postgresql directory with all the files and executables. So what am I missing?
-----Original Message-----
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Susan Joseph <sandajoseph@verizon.net>
Cc: magnus@hagander.net <magnus@hagander.net>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Sent: Thu, Jun 4, 2020 1:11 pm
Subject: Re: PostgreSQL 11 with SSL on Linux
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Susan Joseph <sandajoseph@verizon.net>
Cc: magnus@hagander.net <magnus@hagander.net>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Sent: Thu, Jun 4, 2020 1:11 pm
Subject: Re: PostgreSQL 11 with SSL on Linux
Susan Joseph <sandajoseph@verizon.net> writes:
> So the other issue I have is that I am running this on a server that is not connected to the Internet. So I have downloaded the RPM file but I can't figure out how to install it without it trying to access files on the Internet. Are there other libraries I need to include in my download for this to work on a non-networked server?
Are you using the right install tool? "rpm -i" shouldn't result in any
nonlocal accesses. Tools like yum or dnf will, because they're meant to
fetch from nonlocal repositories.
regards, tom lane
> So the other issue I have is that I am running this on a server that is not connected to the Internet. So I have downloaded the RPM file but I can't figure out how to install it without it trying to access files on the Internet. Are there other libraries I need to include in my download for this to work on a non-networked server?
Are you using the right install tool? "rpm -i" shouldn't result in any
nonlocal accesses. Tools like yum or dnf will, because they're meant to
fetch from nonlocal repositories.
regards, tom lane
On Thu, 2020-06-04 at 17:32 +0000, Susan Joseph wrote:
So when I run rpm -i it says that the package is installed, but I can't find a postgresql directory with all the files and executables. So what am I missing?
The server stuff is in postgresql11-serverif you're using the community rpms.
Susan Joseph <sandajoseph@verizon.net> writes: > So when I run rpm -i it says that the package is installed, but I can't find a postgresql directory with all the filesand executables. So what am I missing? Looking in the right place, perhaps ;-). If the package is installed then "rpm -ql" will list all the files it installed. There are a couple of different layouts that different packagers like to use, so you might be accustomed to something different than what this particular package used. Related to that is that there are almost always sub-packages; it's likely that in addition to an rpm named just postgresql-NNN you need postgresql-server-NNN, and maybe some other bits. regards, tom lane
OK, when I went to PostgreSQL to get the rpm file to install I was given:
yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
I put the file pgdg-redhat-repo-latest.noarch.rpm in my /tmp directory and ran rpm -i on the file.
If I run rpm -qa | grep postgres
I get postgresql-libs-9.2.24-4.el7_8.x86_64
When I run: rpm -ql postgresql-libs-9.2.24-4.el7_8.x86_64 I just get a list of libraries.
I am not an SA, I am more of an engineer and have been working with the PostgreSQL I installed by building it so not really used to RPM. I have used YUM but that was with a connected server.
How do I find all the packages that I need to have to do an install locally?
-----Original Message-----
From: Alan Hodgson <ahodgson@lists.simkin.ca>
To: pgsql-general@lists.postgresql.org
Sent: Thu, Jun 4, 2020 1:36 pm
Subject: Re: PostgreSQL 11 with SSL on Linux
From: Alan Hodgson <ahodgson@lists.simkin.ca>
To: pgsql-general@lists.postgresql.org
Sent: Thu, Jun 4, 2020 1:36 pm
Subject: Re: PostgreSQL 11 with SSL on Linux
On Thu, 2020-06-04 at 17:32 +0000, Susan Joseph wrote:
So when I run rpm -i it says that the package is installed, but I can't find a postgresql directory with all the files and executables. So what am I missing?
The server stuff is in postgresql11-serverif you're using the community rpms.
Susan Joseph <sandajoseph@verizon.net> writes: > OK, when I went to PostgreSQL to get the rpm file to install I was given: > yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm > I put the file pgdg-redhat-repo-latest.noarch.rpm in my /tmp directory and ran rpm -i on the file. I think you've got a fundamental misunderstanding here. That package is not Postgres; it's just a config file that tells your dnf/yum installation where it can download community Postgres RPMs from. If you want to do this on a machine without an internet connection, you need to get the actual Postgres RPMs from that repo and install them manually with "rpm -i". I don't recall which subdirectory on download.postgresql.org has what you want, but if you can't find it by browsing, a look into the installed yum config file should help. > If I run rpm -qa | grep postgres > I get postgresql-libs-9.2.24-4.el7_8.x86_64 This is a postgresql-libs package from Red Hat, not from the community. There's nothing particularly wrong with Red Hat's packaging, except that it tends to be well behind community releases because that's what they think the RHEL distribution ought to be. The main problem from your perspective is the risk of confusion with the libraries that community PG11 RPMs will bring in. You might try a test deinstallation of that RPM first, and see if it cascades to removing anything you can't live without. regards, tom lane
On Thu, Jun 4, 2020 at 1:50 PM Susan Joseph <sandajoseph@verizon.net> wrote:
OK, when I went to PostgreSQL to get the rpm file to install I was given:yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
I put the file pgdg-redhat-repo-latest.noarch.rpm in my /tmp directory and ran rpm -i on the file.
If I run rpm -qa | grep postgres
I get postgresql-libs-9.2.24-4.el7_8.x86_64
When I run: rpm -ql postgresql-libs-9.2.24-4.el7_8.x86_64 I just get a list of libraries.
I am not an SA, I am more of an engineer and have been working with the PostgreSQL I installed by building it so not really used to RPM. I have used YUM but that was with a connected server.
How do I find all the packages that I need to have to do an install locally?
-----Original Message-----
From: Alan Hodgson <ahodgson@lists.simkin.ca>
To: pgsql-general@lists.postgresql.org
Sent: Thu, Jun 4, 2020 1:36 pm
Subject: Re: PostgreSQL 11 with SSL on LinuxOn Thu, 2020-06-04 at 17:32 +0000, Susan Joseph wrote:So when I run rpm -i it says that the package is installed, but I can't find a postgresql directory with all the files and executables. So what am I missing?The server stuff is in postgresql11-serverif you're using the community rpms.
Hi,
I've had to do this in the past and I think you probably want to do this:
1. connect to a machine that has access to repos
3. where it says "Direct RPM Download", click on the "direct download" link
4. this takes you here: https://yum.postgresql.org/rpmchart.php
5. click on "11 RHEL/CentOS/Oracle Linux 7 - x86_64" or whatever is the appropriate version you are looking for
6. this takes you here: https://yum.postgresql.org/11/redhat/rhel-7-x86_64/repoview/
7. under "Available Groups", click on the " PostgreSQL Database Server 11 PGDG" link
8. which takes you here: https://yum.postgresql.org/11/redhat/rhel-7-x86_64/repoview/postgresqldbserver11.group.html
9. here, you'll see four packages listed
10. click on each, which takes you to a page where the latest package is available
11. repeat for all four and download all of the four and copy then to your offline server, so for example, /tmp
12. then try and do an rpm -ivh /tmp/<name_of_pkg>, so for example rpm -ivh postgresql11-server-11.8-1PGDG.rhel7.x86_64
13. I believe this should place the postgres stuff in /var/lib/pgsql
14. additional packages can be downloaded as needed
--
mohammed
OK thanks, I figured I had something messed up in my thought process. I will work through these steps and let you know how it goes.
Susan
-----Original Message-----
From: Mohammed Bhatti <mohammed.bhatti1@gmail.com>
To: Susan Joseph <sandajoseph@verizon.net>
Cc: ahodgson@lists.simkin.ca <ahodgson@lists.simkin.ca>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Sent: Thu, Jun 4, 2020 2:14 pm
Subject: Re: PostgreSQL 11 with SSL on Linux
From: Mohammed Bhatti <mohammed.bhatti1@gmail.com>
To: Susan Joseph <sandajoseph@verizon.net>
Cc: ahodgson@lists.simkin.ca <ahodgson@lists.simkin.ca>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Sent: Thu, Jun 4, 2020 2:14 pm
Subject: Re: PostgreSQL 11 with SSL on Linux
On Thu, Jun 4, 2020 at 1:50 PM Susan Joseph <sandajoseph@verizon.net> wrote:
OK, when I went to PostgreSQL to get the rpm file to install I was given:yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
I put the file pgdg-redhat-repo-latest.noarch.rpm in my /tmp directory and ran rpm -i on the file.
If I run rpm -qa | grep postgres
I get postgresql-libs-9.2.24-4.el7_8.x86_64
When I run: rpm -ql postgresql-libs-9.2.24-4.el7_8.x86_64 I just get a list of libraries.
I am not an SA, I am more of an engineer and have been working with the PostgreSQL I installed by building it so not really used to RPM. I have used YUM but that was with a connected server.
How do I find all the packages that I need to have to do an install locally?
-----Original Message-----
From: Alan Hodgson <ahodgson@lists.simkin.ca>
To: pgsql-general@lists.postgresql.org
Sent: Thu, Jun 4, 2020 1:36 pm
Subject: Re: PostgreSQL 11 with SSL on LinuxOn Thu, 2020-06-04 at 17:32 +0000, Susan Joseph wrote:So when I run rpm -i it says that the package is installed, but I can't find a postgresql directory with all the files and executables. So what am I missing?The server stuff is in postgresql11-serverif you're using the community rpms.
Hi,
I've had to do this in the past and I think you probably want to do this:
1. connect to a machine that has access to repos
3. where it says "Direct RPM Download", click on the "direct download" link
4. this takes you here: https://yum.postgresql.org/rpmchart.php
5. click on "11 RHEL/CentOS/Oracle Linux 7 - x86_64" or whatever is the appropriate version you are looking for
6. this takes you here: https://yum.postgresql.org/11/redhat/rhel-7-x86_64/repoview/
7. under "Available Groups", click on the " PostgreSQL Database Server 11 PGDG" link
8. which takes you here: https://yum.postgresql.org/11/redhat/rhel-7-x86_64/repoview/postgresqldbserver11.group.html
9. here, you'll see four packages listed
10. click on each, which takes you to a page where the latest package is available
11. repeat for all four and download all of the four and copy then to your offline server, so for example, /tmp
12. then try and do an rpm -ivh /tmp/<name_of_pkg>, so for example rpm -ivh postgresql11-server-11.8-1PGDG.rhel7.x86_64
13. I believe this should place the postgres stuff in /var/lib/pgsql
14. additional packages can be downloaded as needed
--
mohammed
Hi Susan, you need to install the openssl rpm if you don't have that already. But it should be a standard package in all Linux distributions,so it should be in your repository. Exmaple from my host: $ rpm -qa openssl openssl-1.1.0i-lp151.1.1.noarch Cheers, Paul > On 04. Jun, 2020, at 18:50, Susan Joseph <sandajoseph@verizon.net> wrote: > > So the other issue I have is that I am running this on a server that is not connected to the Internet. So I have downloadedthe RPM file but I can't figure out how to install it without it trying to access files on the Internet. Are thereother libraries I need to include in my download for this to work on a non-networked server? > > > > -----Original Message----- > From: Magnus Hagander <magnus@hagander.net> > To: Susan Joseph <sandajoseph@verizon.net> > Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org> > Sent: Thu, Jun 4, 2020 11:14 am > Subject: Re: PostgreSQL 11 with SSL on Linux > > > > On Thu, Jun 4, 2020 at 5:01 PM Susan Joseph <sandajoseph@verizon.net> wrote: > Can someone tell me if there is a yum version of PostgreSQL 11 that can be installed on Linux that has SSL enabled? Currentlythe only way I have gotten SSL turned on in PostgreSQL is by doing the following commands: > > • tar xzvf /tmp/postgresql-11.2.tar.gz -C /data > • mv /data/postgresql-11.2 /data/pgsql > • cd /data/pgsql > • ./configure --prefix=/data/pgsql --without-readline --without-zlib --with-openssl >> conf.log > • make > • make install > > All the PostgreSQL versions available om yum from the postgresql.org site have SSL enabled. Just install using the instructionsfrom https://www.postgresql.org/download/. > > -- > Magnus Hagander > Me: https://www.hagander.net/ > Work: https://www.redpill-linpro.com/