I’m trying to Install PostgreSQL on Fedora today. I had install PostgreSQL on RHEL successfully before. Just like RHEL, in Fedora we can use yum command to install PostgreSQL. The only difference is in RHEL you can use RedHat repositories after subscription (you must pay for support), but in Fedora.. you can freely use Fedora repositories.

You can see tutorial/instruction on PostgreSQL Wiki but my experience slightly different. I didn’t configure my YUM repository, just execute:

yum list postgres*
Screenshot from 2015-02-13 15:37:40

Screenshot from 2015-02-13 15:37:40

As you see above, we know the PostgreSQL Server package name is: postgresql-server. To install it, execute command:

yum install postgresql-server

Then it will resolving dependency automatically.

Screenshot from 2015-02-13 15:45:18

Screenshot from 2015-02-13 15:45:18

Wait until installation complete.

Screenshot from 2015-02-13 15:45:47

Screenshot from 2015-02-13 15:45:47

At this point, we must initialize database. And as you see above, I had installed postgresql 9.3.6-1. If you refer to PostgreSQL wiki, for initialize database we must execute command:

service postgresql-9.3 initdb
Screenshot from 2015-02-13 15:46:27

Screenshot from 2015-02-13 15:46:27

But this command didn’t work. So I try another command:

service postgresql initdb

Well, this is work. And so on, from now.. the service name of PostgreSQL server on Fedora 21 is not postgresql-9.x, but just postgresql. The rest of it, you can see on PostgreSQL wiki.

Screenshot from 2015-02-13 15:46:46

Screenshot from 2015-02-13 15:46:46