# How to install PostgreSQL on Ubuntu
https://www.linuxcapable.com/how-to-install-postgresql-on-ubuntu-22-04-lts/
#Install_PostgreSQL
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-22-04
# How To Change The Password of a PostgreSQL User
https://www.postgresqltutorial.com/postgresql-administration/postgresql-change-password/
# Install pgAdmin 4 (APT)
https://www.pgadmin.org/download/pgadmin-4-apt/
sudo apt update
sudo apt install postgresql postgresql-contrib
sudo systemctl start postgresql.service
systemctl status postgresql
# Configure UFW Firewall
sudo ufw enable
sudo ufw allow proto tcp from 192.168.1.0/24 to any port 5432
# Create User & Database
sudo su - postgres -c "createuser <name>"
sudo su - postgres -c "createdb <namedb>"
sudo -i -u postgres
psql
ALTER ROLE <username> WITH PASSWORD <'password'>;
Comments