pg on ubuntu

This commit is contained in:
Ankit Patial 2024-09-30 11:08:25 +00:00
parent 0a2ac572d4
commit 0650a53200

8
pg-install-ubuntu.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/sh
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg
sudo apt update
sudo apt install postgresql-16 postgresql-contrib-16
sudo systemctl enable postgresql
sudo systemctl start postgresql