Changes

Jump to navigation Jump to search
1,624 bytes added ,  21:08, 16 November 2020
Added a section for Postgres 12 installation.
Line 67: Line 67:     
  host    all    all    0.0.0.0 255.255.255.255  reject
 
  host    all    all    0.0.0.0 255.255.255.255  reject
      
'''Be sure to add an extra white line at the end.That why you got an extra line on above box!'''
 
'''Be sure to add an extra white line at the end.That why you got an extra line on above box!'''
Line 106: Line 105:       −
References: <ol></li><li>[http://forums.contribs.org/index.php?topic=38250.msg173298#msg173298 RE: How do I install postgreSQL 8+] by hedererjs</li><li>
+
References: <ol><li>[http://forums.contribs.org/index.php?topic=38250.msg173298#msg173298 RE: How do I install postgreSQL 8+] by hedererjs</li><li>
 
[http://www.issociate.de/board/post/272215/Fwd:_resetting_superuser_password.html Resetting the postgres superuser password]</li></ol>
 
[http://www.issociate.de/board/post/272215/Fwd:_resetting_superuser_password.html Resetting the postgres superuser password]</li></ol>
   Line 113: Line 112:        +
== How to install Postgres 12 ==
 +
 +
{{Note box|This howto is intended for use with SME Server 10, although it may work for other versions.}}
 +
 +
Postgres 12 is one of the latest versions available. The directions here may apply to other versions as well. The installation of version 12 uses RPMs directly from the Postgres support site. The links below come from https://yum.postgresql.org/12/redhat/rhel-7-x86_64/repoview/postgresqldbserver12.group.html but you can adjust the 12 in this link to a different version and get a different version's installation.
 +
 +
First, it is necessary to install the dependencies as well as the contrib RPM.<syntaxhighlight>
 +
yum install https://yum.postgresql.org/12/redhat/rhel-7-x86_64/postgresql12-libs-12.5-1PGDG.rhel7.x86_64.rpm
 +
yum install https://yum.postgresql.org/12/redhat/rhel-7-x86_64/postgresql12-12.5-1PGDG.rhel7.x86_64.rpm
 +
yum install https://yum.postgresql.org/12/redhat/rhel-7-x86_64/postgresql12-contrib-12.5-1PGDG.rhel7.x86_64.rpm
 +
</syntaxhighlight>
 +
 +
Next, install the server portion.<syntaxhighlight>
 +
yum install https://yum.postgresql.org/12/redhat/rhel-7-x86_64/postgresql12-server-12.5-1PGDG.rhel7.x86_64.rpm
 +
</syntaxhighlight>Initialize the database.<syntaxhighlight>
 +
/usr/pgsql-12/bin/postgresql-12-setup initdb
 +
</syntaxhighlight>If you have a previously installed version of Postgres, you will need to stop the service for it before starting the service for the new version. Note that the new service name incorporates the version number. It can be started and enabled like this:<syntaxhighlight>
 +
systemctl start postgresql-12
 +
systemctl enable postgresql-12
 +
</syntaxhighlight>
 
----
 
----
 
[[Category:Howto]]
 
[[Category:Howto]]
 
[[Category:Administration]]
 
[[Category:Administration]]

Navigation menu