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*
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.
Wait until installation complete.
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
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.