Установка и настройка PostgreSQL
1 2 3 4 5 6 7 8 9 10 11 12 |
# Create the file repository configuration: sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' # Import the repository signing key: wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - # Update the package lists: sudo apt-get update # Install the latest version of PostgreSQL. # If you want a specific version, use 'postgresql-12' or similar instead of 'postgresql': sudo apt-get -y install postgresql |
1 2 3 4 5 |
systemctl restart postgresql su – postgres psql -c "ALTER USER postgres WITH PASSWORD '123456';" |
например узнать путь к конфигу:
1 |
su - postgres -c "psql -c 'SHOW config_file;'" |
https://www.postgresql.org/download/linux/ubuntu/
Recommended Posts
Пояснение конфига для Pgbouncer
12.02.2024
Конфигурационный шаблон jinja2 для Patroni
11.02.2024