0% found this document useful (0 votes)
19 views

Inst Step 2

Uploaded by

Aku Adalah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Inst Step 2

Uploaded by

Aku Adalah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

sudo mv /usr/bin/psql /usr/bin/psql_backup

sudo mv /usr/bin/clusterdb /usr/bin/clusterdb_backup

sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-


x86_64/pgdg-redhat-repo-latest.noarch.rpm
sudo dnf -qy module disable postgresql
sudo dnf install -y postgresql12-server
sudo /usr/pgsql-12/bin/postgresql-12-setup initdb
sudo systemctl enable postgresql-12
sudo systemctl start postgresql-12

Ekspor PATH Postgre


export PATH=$PATH:/usr/pgsql-12/bin

check grep postgres


rpm -qa | grep postgresql11-server

CREATE DATABASE rheldc;

\c

CREATE TABLE users (


id serial PRIMARY KEY,
username VARCHAR (50) UNIQUE NOT NULL,
email VARCHAR (100) NOT NULL
);

INSERT INTO users (username, email) VALUES ('john_doe', '[email protected]');


INSERT INTO users (username, email) VALUES ('jane_doe', '[email protected]');

You might also like