1 {%extends
"base/page.html"%}
2 {%block title%}Linux downloads (Red Hat family){%endblock%}
4 <script type=
"text/javascript" src=
"/download/js/yum.js?{{gitrev}}"></script>
8 <h1>Linux downloads (Red Hat family)
<img class=
"logo" src=
"/media/img/redhat.svg" alt=
"Red Hat Logo" /></h1>
10 The Red Hat family of distributions includes:
14 <li>Red Hat Enterprise Linux
</li>
17 <li>CentOS (
7 only)
</li>
24 PostgreSQL is available on these platforms by default. However,
25 each version of the platform normally
"snapshots" a specific version of
26 PostgreSQL that is then supported throughout the lifetime of this platform.
27 Since this can often mean a different version than preferred, the PostgreSQL
28 project provides a
<a href=
"#yum">repository
</a> of packages of all
29 supported versions for the most common distributions.
33 <h2>PostgreSQL Yum Repository
</h2>
35 The
<a href=
"https://yum.postgresql.org" target=
"_blank" rel=
"noopener">PostgreSQL Yum Repository
</a> will integrate
36 with your normal systems and patch management, and provide automatic
37 updates for all supported versions of PostgreSQL throughout the support
38 <a href=
"/support/versioning/">lifetime
</a> of PostgreSQL.
41 The PostgreSQL Yum Repository currently supports:
45 <li>Red Hat Enterprise Linux
</li>
48 <li>CentOS (
7 only)
</li>
50 <li>Fedora
<sup>*
</sup></li>
53 <p><strong><sup>*
</sup>Note
</strong>: due to the shorter support cycle
54 on Fedora, all supported versions of PostgreSQL are not available on this platform. We do not recommend
55 using Fedora for server deployments.
58 To use the PostgreSQL Yum Repository, follow these steps:
61 <li>Select version:
<select id=
"version" class=
"custom-select"></select><br/></li>
62 <li>Select platform:
<select id=
"platform" class=
"custom-select"></select></li>
63 <li>Select architecture:
<select id=
"arch" class=
"custom-select"></select></li>
64 <li>Copy, paste and run the relevant parts of the setup script:
65 <div class=
"pg-script-container">
66 <pre id=
"script-box" class=
"code"></pre>
67 <button id=
"copy-btn" class=
"pg-script-copy-btn">Copy Script
</button>
72 <h2>Included in Distribution
</h2>
74 These distributions all include PostgreSQL by default. To install
75 PostgreSQL from these repositories, use the
<var>dnf
</var> command on RHEL
8 and Fedora:
79 dnf install postgresql-server
83 or
<var>yum
</var> command on RHEL / CentOS
7:
87 yum install postgresql-server
91 Which version of PostgreSQL you get will depend on the version of
94 <table class=
"table table-striped">
103 <th scope=
"row">RHEL / Rocky Linux / AlmaLinux
9</th>
104 <td>16,
15 and
13 (via modules)
</td>
107 <th scope=
"row">RHEL / Rocky Linux / AlmaLinux / OL
8</th>
108 <td>15,
13,
12,
10 and
9.6 via modules
</td>
111 <th scope=
"row">RHEL / CentOS / OL
7</th>
112 <td>9.2 (also supplies package rh-postgresql10, rh-postgresql96, rh-postgresql95 and rh-postgresql94 via SCL)
</td>
115 <th scope=
"row">Fedora
41</th>
119 <th scope=
"row">Fedora
40</th>
125 Other Red Hat family distributions may ship a different version of
126 PostgreSQL by default, check with your distribution vendor to be sure.
130 The repository contains many different packages including third party
131 addons. The most common and important packages are (substitute the
132 version number as required):
134 <table class=
"table table-striped">
137 <th scope=
"row">postgresql-client
</th>
138 <td>libraries and client binaries
</td>
141 <th scope=
"row">postgresql-server
</th>
142 <td>core database server
</td>
145 <th scope=
"row">postgresql-contrib
</th>
146 <td>additional supplied modules
</td>
149 <th scope=
"row">postgresql-devel
</th>
150 <td>libraries and headers for C language development
</td>
155 <h3>Post-installation
</h3>
157 Due to policies for Red Hat family distributions, the PostgreSQL installation
158 will not be enabled for automatic start or have the database initialized
159 automatically. To make your database installation complete, you need to
160 perform the following steps, based on your distribution:
161 <h4>For RHEL / Rocky Linux / AlmaLinux / CentOS / OL
7,
8,
9 or Fedora
40 and later derived distributions:
</h4>
163 postgresql-setup --initdb
164 systemctl enable postgresql.service
165 systemctl start postgresql.service
169 <h2>Direct RPM download
</h2>
171 If you cannot, or do not want to, use the yum based installation method,
172 all the RPMs that are in the yum repository are available for
173 <a href=
"https://yum.postgresql.org/rpmchart/">direct download
</a>
174 and manual installation as well.