PostgreSQL 9.5 was released recently. We released PostgreSQL 9.5 RPMs at the same day.

In this blog post, I am going to write you how to install PostgreSQL 9.5 on RHEL/CentOS/Scientific Linux/Oracle Linux 6 and 7 , Fedora 22 and 23.
First, as usual, you need to install the repository package. Please visit the repo RPMs page. You will see a link to the repo package links. Choose your distro/arch, and install the RPM to your server via your package manager.

Next step is installing PostgreSQL 9.5. You can either install the individual RPMs, or use groupinstall feature that install -libs, -server, -contrib along with the client package.

Please note that Fedora switched to dnf, so the commands will differ slightly:

On RHEL 6 and 7:

yum install postgresql95-server postgresql95-contrib

on Fedora:

dnf install postgresql95-server postgresql95-contrib

The next step is initializing the cluster. This step is different on RHEL 6, as compared to others. On RHEL 6, you can use the init script for initializing your cluster:

service postgresql-9.5 initdb

On RHEL 7 and Fedora, use the custom provided script, as systemd does not allow us to run initdb via unit file:

/usr/pgsql-9.5/bin/postgresql95-setup initdb

If there is no error message, you are ready to start the cluster.

Before starting, let's make sure that PostgreSQL will start on boot. On RHEL 6:

chkconfig postgresql-9.5 on

on RHEL 7 and Fedora:

systemctl enable postgresql-9.5.service

Now, let's start PostgreSQL 9.5. On RHEL 6, this This is done using the init script:

service postgresql-9.5 start

on RHEL 7 and Fedora:

systemctl start postgresql-9.5.service

The postmasters should start, if there is no port conflict, etc.

As of RHEL 7, as done in the Fedora packages for two years, the unit files are located under /lib/systemd/system/ directory. Please do not edit these files directly. Instead, if you want to make any changes, create a copy of them under /etc/systemd/system/ , and edit those files. Run
systemctl daemon-reload
after adding a custom unit file.

Please let us know if you see any packaging issues.



Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.