Загрузка...

Install PostgreSQL on Linux (2026) — Ubuntu, Service, Peer Auth Fix

Install PostgreSQL on Linux with Ubuntu apt, then verify the PostgreSQL service, create an app database, and fix peer authentication failed for user postgres.

This PostgreSQL Ubuntu setup shows the exact terminal flow: install PostgreSQL, check systemd, verify pg_isready, query with psql, create app_user and appdb, understand peer authentication, and connect over localhost as an app user.

Commands shown
sudo apt update
sudo apt install -y postgresql postgresql-contrib
sudo systemctl status postgresql --no-pager
pg_isready
sudo -u postgres psql -c "SELECT version();"
CREATE USER app_user WITH PASSWORD 'devpass';
CREATE DATABASE appdb OWNER app_user;
psql -U postgres
sudo -u postgres psql -c "SELECT current_user;"
psql -h localhost -U app_user -d appdb

Official references
https://www.postgresql.org/download/linux/ubuntu/
https://www.postgresql.org/docs/current/auth-pg-hba-conf.html
https://ubuntu.com/server/docs/how-to/databases/install-postgresql/

#postgresql #linux #ubuntu #database #terminal #installthat

Видео Install PostgreSQL on Linux (2026) — Ubuntu, Service, Peer Auth Fix канала Install That
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять