How to install PostgreSQL on CentOS 9 stream
I. Introduction
PostgreSQL has made its own statement that they are “The World’s Most Advanced Open Source Database”. So what makes PostgreSQL so confident? Then in this article we will learn what Postgresql is and the outstanding features that make Postgresql so powerful around the world in the following article.
What is PostgreSQL?
PostgreSQL is a general-purpose object-relational database management system, the most advanced open source database system available today.
PostgreSQL was developed based on POSTGRES 4.2 at the Berkeley computer science department, University of California. PostgreSQL is designed to run on UNIX-like platforms. However, PostgreSQL was also dynamically adapted to run on many different platforms such as Mac OS X, Solaris, and Windows.
PostgreSQL is a free and open source software. The software’s source code is available under the PostgreSQL license, a freely open source license. Accordingly, you will be free to use, modify, and distribute PostgreSQL in any form.
PostgreSQL does not require too much maintenance because it is highly stable. Therefore, if you develop applications based on PostgreSQL, the cost of ownership will be lower than with other data management systems.
Why use PostgreSQL?
PostgreSQL has a rich set of features that help developers build applications, administrators to protect data integrity, and create fault-tolerant environments that help you manage data regardless of location. . Big or small data set. Besides being free and open source, PostgreSQL also has excellent scalability.
PostgreSQL follows the SQL standard but does not conflict with traditional features or could lead to harmful architectural decisions. Many SQL standard features are supported, but sometimes there may be slightly different syntax or functions.
Some different features of PostgreSQL
1. Data type:
- Primitives: Integer, Number, String, Boolean
- Structure: Date/Time, Array, Range, UUID
- Document: JSON/JSONB, XML, Key-value (Hstore)
- Geometry: Point, Line, Circle, Polygon
- Custom: Composite, custom style
2. Data integrity:
- UNIQUE, NOT NULL
- Main courses
- Foreign key
- Exclusion constraints
- Function key/Clear key,Recommended key/Advisory key
3. At the same time, performance:
- Cataloging: B-Tree, Multiple Columns, Expressions, Partial
- Advanced cataloging: GiST, SP-Gist, KNN Gist, GIN, BRIN, Bloom filters
- Sophisticated query planner/optimizer, index scanning, multi-column statistics.
- Transactions, Transactions in the form of groups (through save points)
- Concurrent Version Control (MVCC)
- Parallel read queries
- Table partition
- All levels of transaction independence are defined in the SQL standard, including Serializable
- Reliability, disaster recovery
- Write Ahead Logging (WAL)
- Replication: Asynchronous, synchronous, logical
- Point-in-time recovery (PITR), active standby
- Tablespace
- Security: Authentication: GSSAPI, SSPI, LDAP, SCRAM-SHA-256, Certificates and others, Robust access control system, Column and row level security
- Procedural languages: PL/PGSQL, Perl, Python (and many others)
- External data wrapper: connects to another database or stream using a standard SQL interface
- Text Search: Supports international character sets, for example via ICU collation, Full Text Search
II. Installation Instructions
To install PostgreSQL on CentOS 9 stream, you can follow these 4 steps.
Step 1: SSH into your VPS
To install PostgreSQL, we first need to SSH or access your VPS or server as root.
After SSH is successful, we continue with step 2 which is Installing PostgreSQL.
Step 2: Install PostgreSQL
First, list all available PostgreSQL server versions using the following command:
dnf module list postgresql
You will get a list of all PostgreSQL versions in the following output:
CentOS 9 - AppStream 6.9 MB/s | 9.7 MB 00:01
CentOS 9 - BaseOS 8.5 MB/s | 6.7 MB 00:00
CentOS 9 - Extras 30 kB/s | 12 kB 00:00
CentOS 9 - AppStream
Name Stream Profiles Summary
postgresql 9.6 client, server [d] PostgreSQL server and client module
postgresql 10 [d] client, server [d] PostgreSQL server and client module
postgresql 12 client, server [d] PostgreSQL server and client module
postgresql 13 client, server [d] PostgreSQL server and client module
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
- Enable PostgreSQL repository