第 3 章 Using PostgreSQL
The PostgreSQL server is an open source robust and highly-extensible database server based on the SQL language. The PostgreSQL server provides an object-relational database system that can manage extensive datasets and a high number of concurrent users.
The PostgreSQL server includes features for ensuring data integrity, building fault-tolerant environments and applications. With the PostgreSQL server, you can extend a database with your own data types, custom functions, or code from different programming languages without the need to recompile the database.
Learn how to install and configure PostgreSQL on a RHEL system, how to back up PostgreSQL data, and how to migrate from an earlier PostgreSQL version.
3.1. Installing PostgreSQL 复制链接链接已复制到粘贴板!
RHEL 10 provides PostgreSQL 16 as the initial version of the Application Stream, which can install as an RPM package. Additional PostgreSQL versions are provided as alternative versions with a shorter life cycle in minor releases of RHEL 10.
By design, you can install only one version (stream) of the same module and, because of conflicting RPM packages, you cannot install multiple PostgreSQL instances on the same host. As an alternative, you can run the database server services in a container. See Using containers to run multiple PostgreSQL instances on a single host.
Procedure
Install the PostgreSQL server packages:
# dnf install postgresql-serverThe
postgressuperuser is created automatically.Initialize the database cluster:
# postgresql-setup --initdbStore the data in the default
/var/lib/pgsql/datadirectory.Enable and start the
postgresqlservice:# systemctl enable --now postgresql.service