How to install PostgreSQL on Fedora 33

By | January 14, 2021
disk drive image

XpsnQt uses PostgreSQL as its database so “How to install PostgreSQL on Fedora 33” became a question worth answering. Once again, most of the stuff you find online is horribly out of date.

Open a terminal and type the following to see just how much PostgreSQL stuff there is in the repos.

sudo dnf search postgresql

That is going to scroll a while because it is a lot! The actual install is accomplished via this terminal command.

sudo dnf install postgresql-server postgresql postgresql-server-devel

Always install the server development package no matter what platform you are working on. Many things need it and few of them are good about listing it as a dependency.

When you are done PostgreSQL will be installed, but not active.

After PostgreSQL install

Just like Manjaro, Fedora doesn’t initialize the database. Unlike Manjaro, it needs a lot more done for the init.

Initializing database

If you try to do what we did in this Manjaro post, it just won’t work. Don’t you love how consistent the Linux community is?

Yes, I tried it.

I could have looked at the shell script and figured out what else it was doing, but just wasn’t worth the pain since this machine only has one disk. If you look at the output of the legitimate command it appears I just needed to set up a log directory.

Now you need to both enable and start the service.

sudo systemctl enable --now postgresql

All that is left is to add a user and you can begin enjoying your database.

Adding user

Happy computing!

Related posts:

Fedora 33 Black Screen Again

Fedora 32 – Black Screen After Login

Linux Distros That Suck at Multiple Hard Drives

Category: Uncategorized

About seasoned_geek

Roland Hughes started his IT career in the early 1980s. He quickly became a consultant and president of Logikal Solutions, a software consulting firm specializing in OpenVMS application and C++/Qt touchscreen/embedded Linux development. Early in his career he became involved in what is now called cross platform development. Given the dearth of useful books on the subject he ventured into the world of professional author in 1995 writing the first of the "Zinc It!" book series for John Gordon Burke Publisher, Inc. A decade later he released a massive (nearly 800 pages) tome "The Minimum You Need to Know to Be an OpenVMS Application Developer" which tried to encapsulate the essential skills gained over what was nearly a 20 year career at that point. From there "The Minimum You Need to Know" book series was born. Three years later he wrote his first novel "Infinite Exposure" which got much notice from people involved in the banking and financial security worlds. Some of the attacks predicted in that book have since come to pass. While it was not originally intended to be a trilogy, it became the first book of "The Earth That Was" trilogy: Infinite Exposure Lesedi - The Greatest Lie Ever Told John Smith - Last Known Survivor of the Microsoft Wars When he is not consulting Roland Hughes posts about technology and sometimes politics on his blog. He also has regularly scheduled Sunday posts appearing on the Interesting Authors blog.