How to Install and Access PostgreSQL 15 on UCS
Introduction
This guide provides step-by-step instructions to install PostgreSQL 15 on Univention Corporate Server (UCS) and access the database to verify its status. Following these steps ensures that all UCS services and applications that depend on PostgreSQL 15 can connect automatically.
1. Installation
Install the required packages for PostgreSQL 15:
univention-install postgresql-15 univention-postgresql-15 univention-postgresql
Enable autostart for PostgreSQL 15:
ucr set postgres15/autostart='yes'
Check the status of the PostgreSQL service:
systemctl status postgresql
Check the cluster status:
pg_lsclusters -h
A successful installation should return something similar to:
15 main 5432 online postgres /var/lib/postgresql/15/main /var/log/postgresql/postgresql-15-main.log
2. Verify Installed Packages
Ensure all necessary packages are installed:
dpkg -l | grep postgre
Expected output:
ii postgresql-15 15.13-0+deb10u1A~5.0.0.202505222124 amd64 The World's Most Advanced Open Source Relational Database
ii postgresql-client-15 15.13-0+deb10u1A~5.0.0.202505222124 amd64 front-end programs for PostgreSQL 15
ii postgresql-client-common 248A~5.0.0.202503141122 all manager for multiple PostgreSQL client versions
ii postgresql-common 248A~5.0.0.202503141122 all PostgreSQL database-cluster manager
ii univention-postgresql 12.0.10-4 all UCS - PostgreSQL configuration
ii univention-postgresql-15 12.0.10-4 all UCS - PostgreSQL 15 configuration
3. Accessing the Database (optional)
Access PostgreSQL as the postgres user:
sudo -u postgres psql
Inside the psql shell, you can:
- List all databases:
\l
- List all roles:
\du
This allows you to verify that the database is active and operational.
Conclusion
After completing these steps, all UCS services and applications requiring PostgreSQL 15 should automatically connect to the database.
See also:
and