[PostgreSQL] Windows ์™ธ๋ถ€ ์ ‘์† ํ—ˆ์šฉ ์„ค์ • ๋ฐ ์™ธ๋ถ€ ์ ‘์† ๋ฐฉ๋ฒ•

2023. 11. 3. 11:08ยท๐Ÿฅ Web/โ” Back-end | etc.
728x90

postgresql.conf ์ˆ˜์ •

C:\Program Files\PostgreSQL\15\data_ ๊ฒฝ๋กœ์— postgresql.conf

listen_addresses = '*'

๋กœ ์„ค์ • - ๋ชจ๋“  ip ์ฃผ์†Œ์—์„œ ์ ‘์† ํ—ˆ์šฉ
white list ip ์„ค์ •ํ•˜๊ณ  ์‹ถ์œผ๋ฉด ip ์ฃผ์†Œ ์“ฐ๊ธฐ

ps_hba.conf ์ˆ˜์ •

C:\Program Files\PostgreSQL\15\data ๊ฒฝ๋กœ์— pg_hba.conf

# IPv4 local connections:

host    all             all             0.0.0.0/0            scram-sha-256

IPv4 local connection address 0.0.0.0/0 ์œผ๋กœ ์ˆ˜์ •(์›๋ž˜๋Š” 127.0.0.1)

๋ฐฉํ™”๋ฒฝ ์„ค์ •

๊ณ ๊ธ‰ ๋ณด์•ˆ์ด ํฌํ•จ๋œ windows defender ๋ฐฉํ™”๋ฒฝ

  • ์ธ๋ฐ”์šด๋“œ ๊ทœ์น™ - ์ƒˆ ๊ทœ์น™
  • ํฌํŠธ
  • tcp
  • ํŠน์ • ๋กœ์ปฌ ํฌํŠธ - 5432
  • ์—ฐ๊ฒฐ ํ—ˆ์šฉ
  • ๋„๋ฉ”์ธ/๊ฐœ์ธ/๊ณต์šฉ ๋ชจ๋‘ ์ ์šฉ
  • ์ด๋ฆ„ - PostgreSQL

์ด๋ ‡๊ฒŒ ํ•˜๋ฉด ์™ธ๋ถ€ ์ ‘์† ์„ค์ •์€ ๋๋‚ฌ๋‹ค. ์ด์ œ ๋ฆฌ๋ˆ…์Šค ์ชฝ์—์„œ ์ ‘์†ํ•ด๋ณด์ž.

linux ํ™˜๊ฒฝ์—์„œ ์ ‘์†ํ•˜๊ธฐ(raspberry pi 4, ubuntu 22.04 jammy)

linux(postgreSQL ์„ค์น˜ ํ•„์š”)

$ sudo apt update && sudo apt upgrade -y 
$ sudo apt install curl ca-certificates gnupg -y 
$ curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null 
$ sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' 
$ sudo apt -y install postgresql-15 
$ sudo apt install postgresql-common 
$ sudo sh /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh

์„ค์น˜ ํ™•์ธ - ํ™œ์„ฑํ™”

$ psql --version
$ sudo systemctl status postgresql

active๋ผ๊ณ  ๋‚˜์˜ค๋ฉด ์‹คํ–‰ ์ค‘, ์•„๋‹Œ ๊ฒฝ์šฐ์—๋Š”

$ sudo systemctl start postgresql

windows ์„œ๋ฒ„๋กœ ์ ‘์†ํ•ด๋ณด๊ธฐ

psql -h {server_ip} -U {username} -d {database_name}

password๋Š” username password๋กœ ์„ค์ •ํ•œ๋Œ€๋กœ ์น˜๊ณ  ๋“ค์–ด๊ฐ€์ฃผ๋ฉด ๋จ

๊ตฟ ๋๋‹ค.

728x90
์ €์ž‘์žํ‘œ์‹œ ๋น„์˜๋ฆฌ ๋ณ€๊ฒฝ๊ธˆ์ง€

'๐Ÿฅ Web > โ” Back-end | etc.' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

[etc] Logout ํ›„ ๋’ค๋กœ ๊ฐ€๊ธฐ ๋ฐฉ์ง€ - BF Cache  (0) 2024.02.23
[Elasticsearch] Index Template ๊ตฌ์„ฑํ•˜๊ธฐ with Kibana & Logstash (2) - Mapping ๊ธฐ์ดˆ  (0) 2023.07.14
[Elasticsearch] Index Template ๊ตฌ์„ฑํ•˜๊ธฐ with Kibana & Logstash (1) - Setting  (0) 2023.07.06
[Elasticsearch] Logstash๋ฅผ ํ†ตํ•ด PostgreSQL๊ณผ Elastic Stack ์—ฐ๋™ํ•˜๊ธฐ  (0) 2023.06.29
[Elasticsearch] Logstash ์‚ฌ์šฉํ•ด๋ณด๊ธฐ  (0) 2023.06.29
'๐Ÿฅ Web/โ” Back-end | etc.' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€
  • [etc] Logout ํ›„ ๋’ค๋กœ ๊ฐ€๊ธฐ ๋ฐฉ์ง€ - BF Cache
  • [Elasticsearch] Index Template ๊ตฌ์„ฑํ•˜๊ธฐ with Kibana & Logstash (2) - Mapping ๊ธฐ์ดˆ
  • [Elasticsearch] Index Template ๊ตฌ์„ฑํ•˜๊ธฐ with Kibana & Logstash (1) - Setting
  • [Elasticsearch] Logstash๋ฅผ ํ†ตํ•ด PostgreSQL๊ณผ Elastic Stack ์—ฐ๋™ํ•˜๊ธฐ
darly213
darly213
ํ˜ธ๋ฝํ˜ธ๋ฝํ•˜์ง€ ์•Š์€ ๊ฐœ๋ฐœ์ž๊ฐ€ ๋˜์–ด๋ณด์ž
  • darly213
    ERROR DENY
    darly213
  • ์ „์ฒด
    ์˜ค๋Š˜
    ์–ด์ œ
    • ๋ถ„๋ฅ˜ ์ „์ฒด๋ณด๊ธฐ (97)
      • ๐Ÿฌ ML & Data (50)
        • ๐ŸŒŠ Computer Vision (2)
        • ๐Ÿ“ฎ Reinforcement Learning (12)
        • ๐Ÿ“˜ ๋…ผ๋ฌธ & ๋ชจ๋ธ ๋ฆฌ๋ทฐ (8)
        • ๐Ÿฆ„ ๋ผ์ดํŠธ ๋”ฅ๋Ÿฌ๋‹ (3)
        • โ” Q & etc. (5)
        • ๐ŸŽซ ๋ผ์ดํŠธ ๋จธ์‹ ๋Ÿฌ๋‹ (20)
      • ๐Ÿฅ Web (21)
        • โšก Back-end | FastAPI (2)
        • โ›… Back-end | Spring (5)
        • โ” Back-end | etc. (9)
        • ๐ŸŽจ Front-end (4)
      • ๐ŸŽผ Project (8)
        • ๐ŸงŠ Monitoring System (8)
      • ๐Ÿˆ Algorithm (0)
      • ๐Ÿ”ฎ CS (2)
      • ๐Ÿณ Docker & Kubernetes (3)
      • ๐ŸŒˆ DEEEEEBUG (2)
      • ๐ŸŒ  etc. (8)
      • ๐Ÿ˜ผ ์‚ฌ๋‹ด (1)
  • ๋ธ”๋กœ๊ทธ ๋ฉ”๋‰ด

    • ํ™ˆ
    • ๋ฐฉ๋ช…๋ก
    • GitHub
    • Notion
    • LinkedIn
  • ๋งํฌ

    • Github
    • Notion
  • ๊ณต์ง€์‚ฌํ•ญ

    • Contact ME!
  • 250x250
  • hELLOยท Designed By์ •์ƒ์šฐ.v4.10.3
darly213
[PostgreSQL] Windows ์™ธ๋ถ€ ์ ‘์† ํ—ˆ์šฉ ์„ค์ • ๋ฐ ์™ธ๋ถ€ ์ ‘์† ๋ฐฉ๋ฒ•
์ƒ๋‹จ์œผ๋กœ

ํ‹ฐ์Šคํ† ๋ฆฌํˆด๋ฐ”