Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →First identify your operating system release and CPU architecture; PostgreSQL package names do not guarantee the same server version across platforms. On Ubuntu, the simplest route is its distribution package. On CentOS-family systems, confirm whether you mean CentOS Stream and check the exact release before using RHEL-family instructions: PostgreSQL’s current Red Hat-family page names RHEL, Rocky Linux, AlmaLinux, and Fedora, but not CentOS. On Windows, use the EDB-hosted installer linked from PostgreSQL.org for a standard setup, or its binaries ZIP only when you need to bundle PostgreSQL into another application.
Before you install: identify the OS release, architecture, and version you need
Record the exact release (for example, Ubuntu 24.04 or CentOS Stream 9), architecture (such as amd64 or arm64), and PostgreSQL major version your application requires. The distribution repository usually provides a version selected for that OS release; the PostgreSQL project’s repositories can offer a different supported version. The available combinations change, so check the official platform page for your exact target rather than assuming that a package name identifies a major version.
For production, select a supported stable release from the appropriate operating-system package matrix. PostgreSQL’s downloads hub also offers beta, release-candidate, and development builds for testing and evaluation; it advises using those builds for testing rather than production systems: PostgreSQL Downloads.
Install PostgreSQL on Ubuntu
Use Ubuntu’s package when its version suits your application
Ubuntu includes PostgreSQL in its repositories. In a typical administrator shell, refresh the package list and install the distribution-selected package:
#1 Best Overall
sudo apt update
sudo apt install postgresql
This installs the PostgreSQL package supplied for your Ubuntu release. To check which package version is available before installing, use Ubuntu’s package tools, for example:
apt-cache policy postgresql
Follow the package installation output for any release-specific setup notes. The package route is the uncomplicated choice when the supplied version meets your application’s needs and you prefer Ubuntu’s normal package-management updates.
Use PostgreSQL’s Apt Repository for a different supported version
If Ubuntu’s package is not the version you need, PostgreSQL documents an Apt Repository setup flow. Its currently listed Ubuntu releases are 26.10 (stonking, non-LTS), 26.04 (resolute, LTS), 24.04 (noble, LTS), and 22.04 (jammy, LTS). The page lists amd64 for these releases and arm64 and ppc64el for LTS releases; confirm that your release and architecture are still listed before proceeding.
The documented automated setup flow is:
sudo apt install -y postgresql-common
sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
Then install the version-specific core server package. The official page gives PostgreSQL 18 as an example; change the major version only to one offered for your target:
Rank #2
sudo apt update
sudo apt install postgresql-18
postgresql-18 is the core server package in that example. The corresponding postgresql-client-18 package provides client libraries and binaries. For exact supported releases, architectures, manual repository configuration, or changes to the current setup instructions, consult PostgreSQL’s Ubuntu installation page.
Install PostgreSQL on CentOS-family and related RPM systems
Confirm which distribution the instructions cover
“CentOS” can refer to different releases and contexts, so establish whether the target is CentOS Stream and which major version it runs. The current PostgreSQL Red Hat-family download page explicitly lists RHEL, Rocky Linux, AlmaLinux, and Fedora, not CentOS. Do not treat the commands below as confirmed CentOS-specific instructions: validate the matching vendor documentation and package source for your CentOS Stream release before using them.
For the distributions the PostgreSQL page does list, the version supplied by the operating system varies by release. Its current matrix lists:
| Distribution release | PostgreSQL versions listed by the page |
|---|---|
| RHEL, Rocky Linux, AlmaLinux 10 | 16 |
| RHEL, Rocky Linux, AlmaLinux 9 | 16, 15, and 13 through modules |
| RHEL, Rocky Linux, AlmaLinux 8 | 15, 13, 12, 10, and 9.6 through modules |
| Fedora 44 and 43 | 18 |
This is a release-specific listing, not a guarantee that another RPM distribution has the same packages. Check the live PostgreSQL Red Hat-family page for the exact system and current package choices.
Rank #3
Install the distribution package and initialize the database
For the listed RHEL-family and Fedora systems, the distribution-package installation command is:
sudo dnf install postgresql-server
Installation alone does not complete the service setup on the releases below. Red Hat-family distribution policy means PostgreSQL is not automatically initialized or enabled to start after installation. For RHEL, Rocky Linux, or AlmaLinux 10, 9, or 8, and Fedora 43 or later, run:
sudo postgresql-setup --initdb
sudo systemctl enable postgresql.service
sudo systemctl start postgresql.service
The first command initializes the database cluster; the next two enable the service at boot and start it now. Check the correct setup utility and service instructions for other releases before copying this sequence. To verify service state on a system using systemd, run:
systemctl status postgresql.service
Choose the PostgreSQL-maintained Yum Repository when needed
If the distribution’s package version is unsuitable, PostgreSQL provides a Yum Repository setup flow for RHEL, Rocky Linux, AlmaLinux, and Fedora. Select the distribution, release, architecture, and PostgreSQL version on the official page, then use the generated setup instructions for that exact combination. Do not use this flow as a substitute for checking CentOS Stream support. PostgreSQL notes that Fedora’s shorter support cycle makes it not recommended for server deployments.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteInstall PostgreSQL on Windows
Use the interactive installer for a typical Windows setup
Start at PostgreSQL’s Windows installers page and follow its link to the EDB-certified installer. The PostgreSQL page says the installer is hosted by EDB, not on PostgreSQL community servers. It includes the PostgreSQL server, pgAdmin, and StackBuilder, and supports graphical and silent installation modes. Follow the installer’s prompts for the components and settings you need.
The page’s tested 64-bit matrix currently lists PostgreSQL 18 for Windows Server 2025 and 2022; PostgreSQL 17 and 16 for Windows Server 2022 and 2019; and PostgreSQL 15, 14, and 13 for Windows Server 2019 and 2016. It says comparable Windows versions, including desktop releases, may generally work. Treat that as the page’s stated tested matrix, not a promise covering every Windows edition or configuration; check the current page against your target before installing.
Use the binaries ZIP only for application bundling
The Windows page also offers a ZIP archive of binaries for advanced users who want to include PostgreSQL in another application installer. This is distinct from the ordinary interactive or silent installer: choose it only if you are prepared to handle the application-bundling and deployment work yourself.
Choose between OS packages and PostgreSQL’s own repositories
The decision is chiefly about version fit and how you want packages maintained. Ubuntu’s repository and the listed RPM distributions’ included packages integrate with their distribution’s package manager; PostgreSQL’s Apt or Yum repository is useful when you need another version offered for your OS and architecture.
Recommended Free Tools
- Choose the distribution package when its PostgreSQL version fits your application and you want the ordinary distribution package route.
- Choose the PostgreSQL-maintained repository when you need a different supported version and your exact OS release and architecture appear in that repository’s current instructions.
- For CentOS Stream, verify before installing. The current PostgreSQL Red Hat-family page does not name CentOS, so confirm support and commands with the relevant vendor and repository documentation.
- For Windows, choose the installer for a standard server setup; choose the binaries ZIP only for advanced application bundling.
Verify that the installation is usable
Package installation is not the same as confirming that the database service is ready for your application. On the RPM releases covered above, initialization and service enablement/startup are explicit steps. On any platform, check the platform’s installation output and service status, then connect with the installed PostgreSQL client using the account and connection settings you configured. The exact default account and authentication behavior can depend on the platform package and installer choices, so use the settings reported for your installation rather than assuming one universal login.
Troubleshooting common installation failures
Ubuntu cannot find the requested package
- Run
sudo apt updateand retry if package metadata may be stale. - Check that the Ubuntu release and architecture are listed by the repository you configured.
- For a version-specific package such as
postgresql-18, verify that the exact major version is offered for your target. A package name for one release is not proof that it exists for every Ubuntu release.
The RPM service does not start or no database cluster exists
- On the documented RHEL/Rocky/AlmaLinux 10, 9, and 8 or Fedora 43-and-later route, confirm that
postgresql-setup --initdbcompleted before starting the service. - Check
systemctl status postgresql.servicefor the service state and diagnostic message. - If the system is a different RPM release or CentOS Stream, verify its release-specific setup utility, service name, and package source rather than assuming the documented sequence applies.
The installed major version is not the one expected
Distribution packages and PostgreSQL-maintained repositories can supply different major versions. Inspect the package version offered for the exact OS release before installation. If you require a different version, use the relevant PostgreSQL-maintained repository only when its current support matrix lists your platform and architecture.
The Windows edition is not in the tested matrix
Compare the target edition and PostgreSQL major version with the current 64-bit matrix on PostgreSQL’s Windows page. The page says comparable desktop Windows versions may generally work, but that statement does not establish support for every edition, configuration, or PostgreSQL release.
Or skip the browser setup
If your next task is capturing a website while documenting or testing a PostgreSQL-backed application, ScreenshotNeo provides a website screenshot API and MCP server for developers. One GET request can return a PNG, JPEG, WebP, or PDF. Its API removes cookie and consent banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, and failed loads are not billed. An MCP server exposes screenshot tools for AI agents, and the Free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsFor a runnable cURL example and API options, see the ScreenshotNeo documentation:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Learn more at ScreenshotNeo, or sign up free for 1,000 screenshots a month with no card.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

