sudo dnf install postgresql-server postgresql-contrib
sudo systemctl enable postgresql sudo postgresql-setup --initdb --unit postgresql sudo systemctl start postgresql
sudo -u postgres psql CREATE USER nazwa_uzytkownika WITH PASSWORD 'haslo_uzytkownika';
CREATE DATABASE mojadb OWNER nazwa_uzytkownika; \q
psql -U nazwa_uzytkownika -d mojadb -W
sudo firewall-cmd --permanent --add-port=5432/tcp sudo firewall-cmd --add-port=5432/tcp sudo firewall-cmd --reload
mojadb=> \l
mojadb=> \dt
Ponadto tabela będzie zawierać pola:
mojadb=> create table test_table (no int, name text);
01
Fedora
mojadb=> insert into test_table (no,name) values (01,'Fedora');