{%extends "base/page.html"%}
{%block title%}Linux downloads (Red Hat family){%endblock%}
{%block contents%}

<h1>Linux downloads (Red Hat family)</h1>
<p>
The Red Hat family of distributions includes Red Hat Enterprise Linux,
CentOS, Fedora, Scientific Linux, Oracle Linux and others.
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>
<p>
Should packages not be available for your distribution, or there are
issues with your package manager, there are graphical installers available.
</p>
<p>
Finally, most Linux systems make it easy to build from source.
</p>

<h2>Included in distribution</h2>
<p>
These distributions all include PostgreSQL by default. To install
PostgreSQL from these repositories, use the <i>yum</i> command:
</p>
<p>
<code>
yum install postgresql-server
</code>
</p>
<p>
Which version of PostgreSQL you get will depend on the version of
the distribution:
<div class="tblBasic">
 <table border="0" cellpadding="0" cellspacing="0" class="tblBasicGrey">
  <tr>
   <th class="colFirst">Distribution</th>
   <th class="colLast">Version</th>
  </tr>
  <tr>
   <td class="colFirst">RHEL/CentOS/SL/OL 5</td>
   <td class="colLast">8.1 (also supplies package postgresql84)</td>
  </tr>
  <tr>
   <td class="colFirst">RHEL/CentOS/SL/OL 6</td>
   <td class="colLast">8.4</td>
  </tr>
  <tr class="lastrow">
   <td class="colFirst">Fedora 18</td>
   <td class="colLast">9.2</td>
  </tr>
  <tr>
   <td class="colFirst">Fedora 19</td>
   <td class="colLast">9.3</td>
  </tr>
  <tr>
   <td class="colFirst">Fedora 20</td>
   <td class="colLast">9.3</td>
  </tr>
 </table>
</div>
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>
<ul>
 <li>postgresql-client   libraries and client binaries</li>
 <li>postgresql-server   core database server</li>
 <li>postgresql-contrib  additional supplied modules</li>
 <li>postgresql-devel    libraries and headers for C language development</li>
 <li>pgadmin3 - pgAdmin III graphical administration utility</li>
</ul>

<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 these two steps:
<code>
service postgresql initdb<br/>
chkconfig postgresql on
</code>
or, on Fedora 19 and other later derived distributions:<br />
<code>
postgresql-setup initdb<br />
systemctl enable postgresql.service
</code>
</p>

<a name="yum"></a><h2>PostgreSQL Yum Repository</h2>
<p>
If the version supplied by your operating system is not the one you want,
you can use the PostgreSQL Yum Repository. This repository 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 Red Hat Enterprise Linux,
CentOS and ScientificLinux versions 5.x and 6.x, as well as current versions
of Fedora. Note that due to the short support cycle on Fedora, all versions
are not available on this platform, and we recommend not using Fedora for
server deployments. All distributions are supported on both x86_64 and
i386 architectures.
</p>
<p>
To use the yum repository, you must first install the <i>repository RPM</i>.
To do this, download the correct RPM from the
<a href="http://yum.postgresql.org/repopackages.php">repository RPM listing</a>,
and install it with commands like:
</p>
<p>
<code>
yum install http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-redhat93-9.3-1.noarch.rpm
</code>
</p>
<p>
Once this is done, you can proceed to install and update packages the
same way as the ones included in the distribution.
</p>
<p>
<code>
yum install postgresql93-server postgresql93-contrib<br/>
service postgresql-9.3 initdb<br/>
chkconfig postgresql-9.3 on
</code>
or, on Fedora 19 and other later derived distributions:<br />
<code>
yum install postgresql93-server postgresql93-contrib<br/>
/usr/pgsql-9.3/bin/postgresql93-setup initdb<br/>
systemctl enable postgresql-9.3.service<br/>
systemctl start postgresql-9.3.service
</code>
</p>
<p>
Package names in the
PostgreSQL yum repository follows the same standard as the ones included
in the main repositories, but include the version number, such as:
</p>
<ul>
 <li>postgresql93</li>
 <li>postgresql93-server</li>
 <li>postgresql93-contrib</li>
 <li>pgadmin3_93</li>
</ul>

<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="http://yum.postgresql.org/rpmchart.php">direct download</a>
and manual installation as well.
</p>

{%include "pages/download/linux/linux_openscg.inc" %}

{%include "pages/download/linux/linux_oneclick.inc" %}

{%include "pages/download/linux/linux_source.inc" %}
{%endblock%}
