понедельник, 19 мая 2025 г.

Установка PostgreSQL на Debian 12.

Установка:
# apt install postgresql postgresql-contrib
При установке Postgresql сразу будет создан и инициирован кластер в директории:
/var/lib/postgresql/15/main
Конфигурационный файл будет тут /etc/postgresql/15/main/postgresql.conf
Файл настроек режимов доступа тут /etc/postgresql/15/main/pg_hba.conf

Запускаем сервис
# systemctl start postgresql.service
# systemctl enable postgresql.service


Подключаемся к базе так:
# sudo -i -u postgres
$ psql

После создания базы и пользователя, а так же после настройки pg_hba.conf можно подключиться к базе данных так:
# psql -h 127.0.0.1 -d <БАЗА> -U <ПОЛЬЗОВАТЕЛЬ> -W 

1 комментарий:

  1. Installing PostgreSQL on Debian 12 is a smooth process that ensures reliable performance for database-driven applications. You can later use powerful tools or emulators like yuzu ea with better backend support once PostgreSQL is up and running.

    ОтветитьУдалить