Installasi Postgresql 12 Pada Linux Debian 10

Assalamualaikum,Wr,Wb

Mari Kita Mulai,


Silahkan Update Terlebih dahulu :

sudo apt update

Kemudian Upgrade 


sudo apt -y upgrade

Mulai Installasi :

sudo apt -y install gnupg2 

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" |sudo tee  /etc/apt/sources.list.d/pgdg.list 
sudo apt update
sudo apt -y install postgresql-12 postgresql-client-12

Cek Status Installasi :

systemctl status postgresql.service
systemctl status postgresql@12-main.service

Kemudian Enable Postgresql :
 systemctl is-enabled postgresql

Masuk ke Postgresql , membuat Password user Postgres , membuat database :

sudo su - postgres
psql -c "alter user postgres with password 'silahkan_isikan_password_anda'"
psql
postgres=# \conninfo
postgres=# CREATE DATABASE database_anda;
postgres=# CREATE USER user_untuk_database WITH ENCRYPTED PASSWORD 'password_user_database'; 
postgres=# GRANT ALL PRIVILEGES ON DATABASE database_anda to user_untuk_database; 
postgres=# \l
postgres-# \c database_anda
Remote Connection Postgresql :

pico  /etc/postgresql/12/main/postgresql.conf
listen_addresses = '*'
pico  /etc/postgresql/12/main/pg_hba.conf

host    all             all             0.0.0.0/0            md5


sudo systemctl restart postgresql

Demikian Installasi Postgresql Pada Debian 10

Terimakasih,

Wassalamualaikum,Wr,Wb

5 comments:

  1. Ohhh... Is your Epson printer misbehaving? Is it showing connect Epson printer to WiFi? Just relax there is nothing to be tensed for, it is just a very common issue and can be fixed easily.

    frasesparaenamorarz.com
    fras-es.com
    punaisesdelit.org

    ReplyDelete
  2. Is there an appropriate distance between your device and electronic devices? No? Immediately maintain a distance of 3 or 4 feet so that the electronics should not be a reason causing this error to you.

    entertainmentbee.com
    themoviesbio.com
    petrefine.com

    ReplyDelete

  3. very nice blogs!!! i have to learning for lot of information for this sites.Sharing for wonderful information. Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing

    Commutative Property of Addition
    Vertical Angles
    Lesson on Greater than Sign
    edublack boards


    ReplyDelete

Powered by Blogger.