Files
postgres-web/templates/pages/download/linux/redhat.html
2020-12-30 01:02:41 +00:00

184 lines
5.3 KiB
HTML

{%extends "base/page.html"%}
{%block title%}Linux downloads (Red Hat family){%endblock%}
{%block extrahead%}
<script type="text/javascript" src="/download/js/yum.js?{{gitrev}}"></script>
{%endblock%}
{%block contents%}
<h1>Linux downloads (Red Hat family) <img class="logo" src="/media/img/redhat.svg" alt="Red Hat Logo" /></h1>
<p>
The Red Hat family of distributions includes:
</p>
<p>
<ul>
<li>Red Hat Enterprise Linux</li>
<li>CentOS</li>
<li>Fedora</li>
<li>Scientific Linux</li>
<li>Oracle Linux</li>
</ul>
</p>
<p>and others.</p>
<p>
PostgreSQL is available on these platforms by default. However,
each version of the platform normally "snapshots" a specific version of
PostgreSQL that is then supported throughout the lifetime of this platform.
Since this can often mean a different version than preferred, the PostgreSQL
project provides a <a href="#yum">repository</a> of packages of all
supported versions for the most common distributions.
</p>
<a name="yum"></a>
<h2>PostgreSQL Yum Repository</h2>
<p>
The <a href="https://yum.postgresql.org" target="_blank" rel="noopener">PostgreSQL Yum Repository</a> will integrate
with your normal systems and patch management, and provide automatic
updates for all supported versions of PostgreSQL throughout the support
<a href="/support/versioning/">lifetime</a> of PostgreSQL.
</p>
<p>
The PostgreSQL Yum Repository currently supports:
</p>
<p>
<ul>
<li>Red Hat Enterprise Linux</li>
<li>CentOS</li>
<li>Scientific Linux</li>
<li>Oracle Linux</li>
<li>Fedora<sup>*</sup></li>
</ul>
</p>
<p><strong><sup>*</sup>Note</strong>: due to the shorter support cycle
on Fedora, all supported versions of PostgreSQL are not available on this platform. We do not recommend
using Fedora for server deployments.
</p>
<p>
To use the PostgreSQL Yum Repository, follow these steps:
</p>
<ol>
<li>Select version: <select id="version" class="custom-select"></select><br/></li>
<li>Select platform: <select id="platform" class="custom-select"></select></li>
<li>Select architecture: <select id="arch" class="custom-select"></select></li>
<li>Copy, paste and run the relevant parts of the setup script:
<div class="pg-script-container">
<pre id="script-box" class="code"></pre>
<button id="copy-btn" class="pg-script-copy-btn">Copy Script</button>
</div>
</li>
</ol>
<h2>Included in Distribution</h2>
<p>
These distributions all include PostgreSQL by default. To install
PostgreSQL from these repositories, use the <var>yum</var> command on RHEL 6 and 7:
</p>
<p>
<code>
yum install postgresql-server
</code>
</p>
<p>
or <var>dnf</var> command on RHEL 8 and Fedora:
</p>
<p>
<code>
dnf install postgresql-server
</code>
</p>
<p>
Which version of PostgreSQL you get will depend on the version of
the distribution:
</p>
<table class="table table-striped">
<thead class="thead-light">
<tr>
<th>Distribution</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">RHEL/CentOS/OL 8</th>
<td>10 and 9.6 via modules</td>
</tr>
<tr>
<th scope="row">RHEL/CentOS/SL/OL 7</th>
<td>9.2 (also supplies package rh-postgresql10, rh-postgresql96, rh-postgresql95 and rh-postgresql94 via SCL)</td>
</tr>
<tr>
<th scope="row">RHEL/CentOS/SL/OL 6</th>
<td>8.4 (also supplies package rh-postgresql96, via SCL)</td>
</tr>
<tr>
<th scope="row">Fedora 33</th>
<td>12</td>
</tr>
<tr>
<th scope="row">Fedora 32</th>
<td>12</td>
</tr>
</tbody>
</table>
<p>
Other Red Hat family distributions may ship a different version of
PostgreSQL by default, check with your distribution vendor to be sure.
</p>
<p>
The repository contains many different packages including third party
addons. The most common and important packages are (substitute the
version number as required):
</p>
<table class="table table-striped">
<tbody>
<tr>
<th scope="row">postgresql-client</th>
<td>libraries and client binaries</td>
</tr>
<tr>
<th scope="row">postgresql-server</th>
<td>core database server</td>
</tr>
<tr>
<th scope="row">postgresql-contrib</th>
<td>additional supplied modules</td>
</tr>
<tr>
<th scope="row">postgresql-devel</th>
<td>libraries and headers for C language development</td>
</tr>
<tr>
<th scope="row">pgadmin4</th>
<td>pgAdmin 4 graphical administration utility</td>
</tr>
</tbody>
</table>
<h3>Post-installation</h3>
<p>
Due to policies for Red Hat family distributions, the PostgreSQL installation
will not be enabled for automatic start or have the database initialized
automatically. To make your database installation complete, you need to
perform the following steps, based on your distribution:
<h4>For RHEL / CentOS / SL / OL 6</h4>
<pre class="code">
service postgresql initdb
chkconfig postgresql on
</pre>
<h4>For RHEL / CentOS / SL / OL 7, 8 or Fedora 31 and later derived distributions:</h4>
<pre class="code">
postgresql-setup --initdb
systemctl enable postgresql.service
systemctl start postgresql.service
</pre>
</p>
<h2>Direct RPM download</h2>
<p>
If you cannot, or do not want to, use the yum based installation method,
all the RPMs that are in the yum repository are available for
<a href="https://yum.postgresql.org/rpmchart/">direct download</a>
and manual installation as well.
</p>
{%endblock%}