MacLochlainns Weblog

Michael McLaughlin's Technical Blog

Site Admin

Fedora Install PostgreSQL

without comments

The following shows you the install of PostgreSQL 9.6 on Fedora 27. You either use the sudoer privileges as a user in the sudoer group, or by using the su command to become the root user:

sudo yum install -y postgres*

It should display the following installation:

Last metadata expiration check: 2:22:55 ago on Sat 12 May 2018 02:48:53 PM MDT.
Package postgresql-libs-9.6.8-1.fc27.x86_64 is already installed, skipping.
Dependencies resolved.
================================================================================================
 Package                               Arch         Version                 Repository     Size
================================================================================================
Installing:
 postgresql                            x86_64       9.6.8-1.fc27            updates       1.4 M
 postgresql-contrib                    x86_64       9.6.8-1.fc27            updates       746 k
 postgresql-dbi-link                   noarch       2.0.0-16.fc27           fedora        617 k
 postgresql-docs                       x86_64       9.6.8-1.fc27            updates        11 M
 postgresql-ip4r                       x86_64       2.0.2-14.fc27           fedora         68 k
 postgresql-jdbc                       noarch       9.4.1212-4.fc27         fedora        494 k
 postgresql-jdbc-javadoc               noarch       9.4.1212-4.fc27         fedora        396 k
 postgresql-jdbc-parent-poms           noarch       9.4.1212-4.fc27         fedora         25 k
 postgresql-odbc                       x86_64       09.06.0410-1.fc27       fedora        386 k
 postgresql-odbc-tests                 x86_64       09.06.0410-1.fc27       fedora        100 k
 postgresql-pgpool-II-devel            x86_64       3.6.5-3.fc27            fedora         26 k
 postgresql-pgpool-II-extensions       x86_64       3.6.5-3.fc27            fedora         26 k
 postgresql-pgpoolAdmin                noarch       3.6.1-2.fc27            fedora        890 k
 postgresql-plperl                     x86_64       9.6.8-1.fc27            updates        97 k
 postgresql-plpython                   x86_64       9.6.8-1.fc27            updates       111 k
 postgresql-plpython3                  x86_64       9.6.8-1.fc27            updates       110 k
 postgresql-plruby                     x86_64       0.5.4-15.fc27           fedora        105 k
 postgresql-plruby-doc                 x86_64       0.5.4-15.fc27           fedora         22 k
 postgresql-pltcl                      x86_64       9.6.8-1.fc27            updates        77 k
 postgresql-static                     x86_64       9.6.8-1.fc27            updates        80 k
 postgresql-upgrade                    x86_64       9.6.8-1.fc27            updates       3.1 M
 postgresql_autodoc                    noarch       1.41-8.fc27             fedora         31 k
Installing dependencies:
 libmemcached-libs                     x86_64       1.0.18-10.fc27          fedora        134 k
 nginx-filesystem                      noarch       1:1.12.1-1.fc27         fedora         20 k
 perl-DBD-Pg                           x86_64       3.7.0-1.fc27            fedora        212 k
 perl-HTML-Template                    noarch       2.97-3.fc27             fedora         79 k
 perl-YAML                             noarch       1.23-4.fc27             fedora         91 k
 php                                   x86_64       7.1.17-1.fc27           updates       2.8 M
 php-cli                               x86_64       7.1.17-1.fc27           updates       4.2 M
 php-common                            x86_64       7.1.17-1.fc27           updates       1.0 M
 php-json                              x86_64       7.1.17-1.fc27           updates        73 k
 php-pdo                               x86_64       7.1.17-1.fc27           updates       138 k
 php-pgsql                             x86_64       7.1.17-1.fc27           updates       135 k
 postgresql-devel                      x86_64       9.6.8-1.fc27            updates       1.2 M
 postgresql-pgpool-II                  x86_64       3.6.5-3.fc27            fedora        571 k
 postgresql-server                     x86_64       9.6.8-1.fc27            updates       4.7 M
 postgresql-test                       x86_64       9.6.8-1.fc27            updates       1.5 M
 tcl-pgtcl                             x86_64       2.1.1-6.fc27            fedora         99 k
 unixODBC-devel                        x86_64       2.3.5-2.fc27            updates        62 k
 uuid                                  x86_64       1.6.2-39.fc27           fedora         61 k
Installing weak dependencies:
 php-fpm                               x86_64       7.1.17-1.fc27           updates       1.5 M
 
Transaction Summary
================================================================================================
Install  41 Packages
 
Total download size: 38 M
Installed size: 130 M
Downloading Packages:
(1/41): postgresql-ip4r-2.0.2-14.fc27.x86_64.rpm                128 kB/s |  68 kB     00:00    
(2/41): postgresql-jdbc-9.4.1212-4.fc27.noarch.rpm              650 kB/s | 494 kB     00:00    
(3/41): postgresql-dbi-link-2.0.0-16.fc27.noarch.rpm            803 kB/s | 617 kB     00:00    
(4/41): postgresql-jdbc-javadoc-9.4.1212-4.fc27.noarch.rpm      1.3 MB/s | 396 kB     00:00    
(5/41): postgresql-jdbc-parent-poms-9.4.1212-4.fc27.noarch.rpm  219 kB/s |  25 kB     00:00    
(6/41): postgresql-odbc-tests-09.06.0410-1.fc27.x86_64.rpm      679 kB/s | 100 kB     00:00    
(7/41): postgresql-pgpool-II-extensions-3.6.5-3.fc27.x86_64.rpm 206 kB/s |  26 kB     00:00    
(8/41): postgresql-plruby-0.5.4-15.fc27.x86_64.rpm              840 kB/s | 105 kB     00:00    
(9/41): postgresql-plruby-doc-0.5.4-15.fc27.x86_64.rpm          241 kB/s |  22 kB     00:00    
(10/41): postgresql-pgpoolAdmin-3.6.1-2.fc27.noarch.rpm         3.5 MB/s | 890 kB     00:00    
(11/41): postgresql_autodoc-1.41-8.fc27.noarch.rpm              336 kB/s |  31 kB     00:00    
(12/41): perl-YAML-1.23-4.fc27.noarch.rpm                       616 kB/s |  91 kB     00:00    
(13/41): postgresql-pgpool-II-3.6.5-3.fc27.x86_64.rpm           5.4 MB/s | 571 kB     00:00    
(14/41): perl-DBD-Pg-3.7.0-1.fc27.x86_64.rpm                    1.4 MB/s | 212 kB     00:00    
(15/41): perl-HTML-Template-2.97-3.fc27.noarch.rpm              774 kB/s |  79 kB     00:00    
(16/41): libmemcached-libs-1.0.18-10.fc27.x86_64.rpm            1.5 MB/s | 134 kB     00:00    
(17/41): postgresql-contrib-9.6.8-1.fc27.x86_64.rpm             807 kB/s | 746 kB     00:00    
(18/41): postgresql-upgrade-9.6.8-1.fc27.x86_64.rpm             2.7 MB/s | 3.1 MB     00:01    
(19/41): postgresql-9.6.8-1.fc27.x86_64.rpm                     4.5 MB/s | 1.4 MB     00:00    
(20/41): postgresql-server-9.6.8-1.fc27.x86_64.rpm              3.5 MB/s | 4.7 MB     00:01    
(21/41): postgresql-test-9.6.8-1.fc27.x86_64.rpm                6.4 MB/s | 1.5 MB     00:00    
(22/41): postgresql-pltcl-9.6.8-1.fc27.x86_64.rpm               324 kB/s |  77 kB     00:00    
(23/41): postgresql-plpython3-9.6.8-1.fc27.x86_64.rpm           693 kB/s | 110 kB     00:00    
(24/41): postgresql-plpython-9.6.8-1.fc27.x86_64.rpm            519 kB/s | 111 kB     00:00    
(25/41): postgresql-plperl-9.6.8-1.fc27.x86_64.rpm              515 kB/s |  97 kB     00:00    
(26/41): uuid-1.6.2-39.fc27.x86_64.rpm                          197 kB/s |  61 kB     00:00    
(27/41): postgresql-devel-9.6.8-1.fc27.x86_64.rpm               6.0 MB/s | 1.2 MB     00:00    
(28/41): postgresql-static-9.6.8-1.fc27.x86_64.rpm              608 kB/s |  80 kB     00:00    
(29/41): tcl-pgtcl-2.1.1-6.fc27.x86_64.rpm                      450 kB/s |  99 kB     00:00    
(30/41): postgresql-pgpool-II-devel-3.6.5-3.fc27.x86_64.rpm     295 kB/s |  26 kB     00:00    
(31/41): postgresql-docs-9.6.8-1.fc27.x86_64.rpm                 18 MB/s |  11 MB     00:00    
(32/41): php-7.1.17-1.fc27.x86_64.rpm                           8.5 MB/s | 2.8 MB     00:00    
(33/41): php-cli-7.1.17-1.fc27.x86_64.rpm                        13 MB/s | 4.2 MB     00:00    
(34/41): postgresql-odbc-09.06.0410-1.fc27.x86_64.rpm           662 kB/s | 386 kB     00:00    
(35/41): php-common-7.1.17-1.fc27.x86_64.rpm                    4.6 MB/s | 1.0 MB     00:00    
(36/41): php-json-7.1.17-1.fc27.x86_64.rpm                      409 kB/s |  73 kB     00:00    
(37/41): php-pgsql-7.1.17-1.fc27.x86_64.rpm                     607 kB/s | 135 kB     00:00    
(38/41): php-pdo-7.1.17-1.fc27.x86_64.rpm                       1.0 MB/s | 138 kB     00:00    
(39/41): unixODBC-devel-2.3.5-2.fc27.x86_64.rpm                 316 kB/s |  62 kB     00:00    
(40/41): nginx-filesystem-1.12.1-1.fc27.noarch.rpm              214 kB/s |  20 kB     00:00    
(41/41): php-fpm-7.1.17-1.fc27.x86_64.rpm                       4.1 MB/s | 1.5 MB     00:00    
------------------------------------------------------------------------------------------------
Total                                                           7.1 MB/s |  38 MB     00:05     
warning: /var/cache/dnf/fedora-cba4cf65782eccda/packages/postgresql-dbi-link-2.0.0-16.fc27.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f5282ee4: NOKEY
Importing GPG key 0xF5282EE4:
 Userid     : "Fedora 27 (27) <fedora-27@fedoraproject.org>"
 Fingerprint: 860E 19B0 AFA8 00A1 7518 81A6 F55E 7430 F528 2EE4
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-27-x86_64
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                        1/1 
  Installing       : php-json-7.1.17-1.fc27.x86_64                                         1/41 
  Installing       : php-common-7.1.17-1.fc27.x86_64                                       2/41 
  Installing       : postgresql-9.6.8-1.fc27.x86_64                                        3/41 
  Running scriptlet: postgresql-server-9.6.8-1.fc27.x86_64                                 4/41 
  Installing       : postgresql-server-9.6.8-1.fc27.x86_64                                 4/41 
  Running scriptlet: postgresql-server-9.6.8-1.fc27.x86_64                                 4/41 
  Installing       : postgresql-devel-9.6.8-1.fc27.x86_64                                  5/41 
  Installing       : postgresql-test-9.6.8-1.fc27.x86_64                                   6/41 
  Installing       : postgresql-plruby-0.5.4-15.fc27.x86_64                                7/41 
  Installing       : php-cli-7.1.17-1.fc27.x86_64                                          8/41 
  Installing       : php-7.1.17-1.fc27.x86_64                                              9/41 
  Installing       : php-pdo-7.1.17-1.fc27.x86_64                                         10/41 
  Installing       : php-pgsql-7.1.17-1.fc27.x86_64                                       11/41 
  Running scriptlet: nginx-filesystem-1:1.12.1-1.fc27.noarch                              12/41 
  Installing       : nginx-filesystem-1:1.12.1-1.fc27.noarch                              12/41 
  Installing       : unixODBC-devel-2.3.5-2.fc27.x86_64                                   13/41 
  Installing       : postgresql-odbc-09.06.0410-1.fc27.x86_64                             14/41 
  Running scriptlet: postgresql-odbc-09.06.0410-1.fc27.x86_64                             14/41 
  Installing       : tcl-pgtcl-2.1.1-6.fc27.x86_64                                        15/41 
  Installing       : uuid-1.6.2-39.fc27.x86_64                                            16/41 
  Running scriptlet: uuid-1.6.2-39.fc27.x86_64                                            16/41 
  Installing       : libmemcached-libs-1.0.18-10.fc27.x86_64                              17/41 
  Running scriptlet: libmemcached-libs-1.0.18-10.fc27.x86_64                              17/41 
  Installing       : postgresql-pgpool-II-3.6.5-3.fc27.x86_64                             18/41 
  Running scriptlet: postgresql-pgpool-II-3.6.5-3.fc27.x86_64                             18/41 
  Installing       : perl-HTML-Template-2.97-3.fc27.noarch                                19/41 
  Installing       : perl-DBD-Pg-3.7.0-1.fc27.x86_64                                      20/41 
  Installing       : perl-YAML-1.23-4.fc27.noarch                                         21/41 
  Installing       : postgresql-dbi-link-2.0.0-16.fc27.noarch                             22/41 
  Installing       : postgresql_autodoc-1.41-8.fc27.noarch                                23/41 
  Installing       : postgresql-pgpool-II-extensions-3.6.5-3.fc27.x86_64                  24/41 
  Installing       : postgresql-pgpoolAdmin-3.6.1-2.fc27.noarch                           25/41 
  Running scriptlet: postgresql-pgpoolAdmin-3.6.1-2.fc27.noarch                           25/41 
httpd.service is not active, cannot reload.
warning: %post(postgresql-pgpoolAdmin-3.6.1-2.fc27.noarch) scriptlet failed, exit status 1
Non-fatal POSTIN scriptlet failure in rpm package postgresql-pgpoolAdmin
Non-fatal POSTIN scriptlet failure in rpm package postgresql-pgpoolAdmin
  Installing       : postgresql-pgpool-II-devel-3.6.5-3.fc27.x86_64                       26/41 
  Installing       : postgresql-contrib-9.6.8-1.fc27.x86_64                               27/41 
  Installing       : postgresql-pltcl-9.6.8-1.fc27.x86_64                                 28/41 
  Installing       : postgresql-odbc-tests-09.06.0410-1.fc27.x86_64                       29/41 
  Installing       : php-fpm-7.1.17-1.fc27.x86_64                                         30/41 
  Running scriptlet: php-fpm-7.1.17-1.fc27.x86_64                                         30/41 
  Installing       : postgresql-plruby-doc-0.5.4-15.fc27.x86_64                           31/41 
  Installing       : postgresql-static-9.6.8-1.fc27.x86_64                                32/41 
  Installing       : postgresql-ip4r-2.0.2-14.fc27.x86_64                                 33/41 
  Installing       : postgresql-upgrade-9.6.8-1.fc27.x86_64                               34/41 
  Installing       : postgresql-plpython3-9.6.8-1.fc27.x86_64                             35/41 
  Installing       : postgresql-plpython-9.6.8-1.fc27.x86_64                              36/41 
  Installing       : postgresql-plperl-9.6.8-1.fc27.x86_64                                37/41 
  Installing       : postgresql-docs-9.6.8-1.fc27.x86_64                                  38/41 
  Installing       : postgresql-jdbc-parent-poms-9.4.1212-4.fc27.noarch                   39/41 
  Installing       : postgresql-jdbc-javadoc-9.4.1212-4.fc27.noarch                       40/41 
  Installing       : postgresql-jdbc-9.4.1212-4.fc27.noarch                               41/41 
  Running scriptlet: postgresql-jdbc-9.4.1212-4.fc27.noarch                               41/41 
Running as unit: run-r4842574cdaba436d90aabf16c83a6041.service
  Verifying        : postgresql-dbi-link-2.0.0-16.fc27.noarch                              1/41 
  Verifying        : postgresql-ip4r-2.0.2-14.fc27.x86_64                                  2/41 
  Verifying        : postgresql-jdbc-9.4.1212-4.fc27.noarch                                3/41 
  Verifying        : postgresql-jdbc-javadoc-9.4.1212-4.fc27.noarch                        4/41 
  Verifying        : postgresql-jdbc-parent-poms-9.4.1212-4.fc27.noarch                    5/41 
  Verifying        : postgresql-odbc-tests-09.06.0410-1.fc27.x86_64                        6/41 
  Verifying        : postgresql-pgpool-II-extensions-3.6.5-3.fc27.x86_64                   7/41 
  Verifying        : postgresql-pgpoolAdmin-3.6.1-2.fc27.noarch                            8/41 
  Verifying        : postgresql-plruby-0.5.4-15.fc27.x86_64                                9/41 
  Verifying        : postgresql-plruby-doc-0.5.4-15.fc27.x86_64                           10/41 
  Verifying        : postgresql_autodoc-1.41-8.fc27.noarch                                11/41 
  Verifying        : perl-YAML-1.23-4.fc27.noarch                                         12/41 
  Verifying        : postgresql-pgpool-II-3.6.5-3.fc27.x86_64                             13/41 
  Verifying        : perl-DBD-Pg-3.7.0-1.fc27.x86_64                                      14/41 
  Verifying        : perl-HTML-Template-2.97-3.fc27.noarch                                15/41 
  Verifying        : libmemcached-libs-1.0.18-10.fc27.x86_64                              16/41 
  Verifying        : postgresql-upgrade-9.6.8-1.fc27.x86_64                               17/41 
  Verifying        : postgresql-server-9.6.8-1.fc27.x86_64                                18/41 
  Verifying        : postgresql-contrib-9.6.8-1.fc27.x86_64                               19/41 
  Verifying        : postgresql-9.6.8-1.fc27.x86_64                                       20/41 
  Verifying        : postgresql-test-9.6.8-1.fc27.x86_64                                  21/41 
  Verifying        : postgresql-pltcl-9.6.8-1.fc27.x86_64                                 22/41 
  Verifying        : postgresql-plpython3-9.6.8-1.fc27.x86_64                             23/41 
  Verifying        : postgresql-plpython-9.6.8-1.fc27.x86_64                              24/41 
  Verifying        : postgresql-plperl-9.6.8-1.fc27.x86_64                                25/41 
  Verifying        : uuid-1.6.2-39.fc27.x86_64                                            26/41 
  Verifying        : postgresql-docs-9.6.8-1.fc27.x86_64                                  27/41 
  Verifying        : postgresql-devel-9.6.8-1.fc27.x86_64                                 28/41 
  Verifying        : tcl-pgtcl-2.1.1-6.fc27.x86_64                                        29/41 
  Verifying        : postgresql-static-9.6.8-1.fc27.x86_64                                30/41 
  Verifying        : postgresql-odbc-09.06.0410-1.fc27.x86_64                             31/41 
  Verifying        : postgresql-pgpool-II-devel-3.6.5-3.fc27.x86_64                       32/41 
  Verifying        : php-7.1.17-1.fc27.x86_64                                             33/41 
  Verifying        : php-cli-7.1.17-1.fc27.x86_64                                         34/41 
  Verifying        : php-common-7.1.17-1.fc27.x86_64                                      35/41 
  Verifying        : php-json-7.1.17-1.fc27.x86_64                                        36/41 
  Verifying        : php-pgsql-7.1.17-1.fc27.x86_64                                       37/41 
  Verifying        : php-pdo-7.1.17-1.fc27.x86_64                                         38/41 
  Verifying        : unixODBC-devel-2.3.5-2.fc27.x86_64                                   39/41 
  Verifying        : php-fpm-7.1.17-1.fc27.x86_64                                         40/41 
  Verifying        : nginx-filesystem-1:1.12.1-1.fc27.noarch                              41/41 
 
Installed:
  postgresql.x86_64 9.6.8-1.fc27                                                                
  postgresql-contrib.x86_64 9.6.8-1.fc27                                                        
  postgresql-dbi-link.noarch 2.0.0-16.fc27                                                      
  postgresql-docs.x86_64 9.6.8-1.fc27                                                           
  postgresql-ip4r.x86_64 2.0.2-14.fc27                                                          
  postgresql-jdbc.noarch 9.4.1212-4.fc27                                                        
  postgresql-jdbc-javadoc.noarch 9.4.1212-4.fc27                                                
  postgresql-jdbc-parent-poms.noarch 9.4.1212-4.fc27                                            
  postgresql-odbc.x86_64 09.06.0410-1.fc27                                                      
  postgresql-odbc-tests.x86_64 09.06.0410-1.fc27                                                
  postgresql-pgpool-II-devel.x86_64 3.6.5-3.fc27                                                
  postgresql-pgpool-II-extensions.x86_64 3.6.5-3.fc27                                           
  postgresql-pgpoolAdmin.noarch 3.6.1-2.fc27                                                    
  postgresql-plperl.x86_64 9.6.8-1.fc27                                                         
  postgresql-plpython.x86_64 9.6.8-1.fc27                                                       
  postgresql-plpython3.x86_64 9.6.8-1.fc27                                                      
  postgresql-plruby.x86_64 0.5.4-15.fc27                                                        
  postgresql-plruby-doc.x86_64 0.5.4-15.fc27                                                    
  postgresql-pltcl.x86_64 9.6.8-1.fc27                                                          
  postgresql-static.x86_64 9.6.8-1.fc27                                                         
  postgresql-upgrade.x86_64 9.6.8-1.fc27                                                        
  postgresql_autodoc.noarch 1.41-8.fc27                                                         
  php-fpm.x86_64 7.1.17-1.fc27                                                                  
  libmemcached-libs.x86_64 1.0.18-10.fc27                                                       
  nginx-filesystem.noarch 1:1.12.1-1.fc27                                                       
  perl-DBD-Pg.x86_64 3.7.0-1.fc27                                                               
  perl-HTML-Template.noarch 2.97-3.fc27                                                         
  perl-YAML.noarch 1.23-4.fc27                                                                  
  php.x86_64 7.1.17-1.fc27                                                                      
  php-cli.x86_64 7.1.17-1.fc27                                                                  
  php-common.x86_64 7.1.17-1.fc27                                                               
  php-json.x86_64 7.1.17-1.fc27                                                                 
  php-pdo.x86_64 7.1.17-1.fc27                                                                  
  php-pgsql.x86_64 7.1.17-1.fc27                                                                
  postgresql-devel.x86_64 9.6.8-1.fc27                                                          
  postgresql-pgpool-II.x86_64 3.6.5-3.fc27                                                      
  postgresql-server.x86_64 9.6.8-1.fc27                                                         
  postgresql-test.x86_64 9.6.8-1.fc27                                                           
  tcl-pgtcl.x86_64 2.1.1-6.fc27                                                                 
  unixODBC-devel.x86_64 2.3.5-2.fc27                                                            
  uuid.x86_64 1.6.2-39.fc27                                                                     
 
Complete!

While I started the PostgreSQL instance with the following:

service postgresql initdb

It gave me the following warning:

Hint: the preferred way to do this is now "/usr/bin/postgresql-setup --initdb --unit postgresql"
 * Initializing database in '/var/lib/pgsql/data'
 * Initialized, logs are in /var/lib/pgsql/initdb_postgresql.log

So, you should use the following to initialize the PostgreSQL database:

/usr/bin/postgresql-setup --initdb --unit postgresql

As always, I hope this helps those looking for the hidden configuration script.

Written by maclochlainn

May 12th, 2018 at 10:58 pm