Installing postgresql
dnf install postgresql
dnf install postgresql-server
Enable postgres service
systemctl enable postgresql.service
Initialize postgresql Files
postgresql-setup initdb
Setup postgresql
Set METHOD of address 127.0.0.1
and ::1
to trust
at the pg_hba.conf
file.
File /var/lib/pgsql/data/pg_hba.conf`
Login to psql shell:
psql --host=localhost --user=postgres
Set password inside psql shell:
\password
Logout of psql shell with \q
or press Ctrl+D on your keyboard.
Restart postgres service:
service postgresql restart
Login to psql shell
psql --host=localhost --user=postgres