티스토리 뷰
원격 서버에 postgreSQL이 설치만 되어있는 상황
서버환경
우분투 20.04
postgreSQL 12
로컬환경
window 10
postgreSQL 설치 (원격)
sudo apt-get update
sudo apt-get install postgresql
관련 설정 경로)
/etc/postgresql/12/main
방화벽 & 외부접근 허용 설정
우분투)
sudo ufw allow 5432 # 방화벽 열기
sudo systemctl enable postgresql #재시작
postgreSQL)
- postgresql.conf
# vim으로 편집할 경우
vim /etc/postgresql/12/main/postgresql.conf
listen_addresses = '*' # 모든 접근 허용

- pg_hba.conf
vim /etc/postgresql/12/main/pg_hba.conf
# Database administrative login by Unix domain socket
local all postgres peer
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all peer
# IPv4 local connections:
host all all 0.0.0.0/0 trust # 수정한 부분
# IPv6 local connections:
host all all ::1/128 trust # 수정한 부분
# Allow replication connections from localhost, by a user with the
# replication privilege.
local replication all peer
host replication all 127.0.0.1/32 md5
host replication all ::1/128 md5
host all all 0.0.0.0/0 trust # 추가한 부분

pg_hba 설정에서 워낙 헤매서 참고한 블로그도 같이 공유!
참고)
pgAdmin 4 설치 (로컬)
https://www.pgadmin.org/download/pgadmin-4-windows/
Download
pgAdmin 4 (Windows) Download Maintainer: pgAdmin Development Team pgAdmin is available for 64 bit Windows™ 7 SP1 (desktop) or 2008R2 (server) and above, up to v4.30. v5.0 and later are supported on Windows 8 (desktop) or 2012 (server) and above. v7.0 and
www.pgadmin.org
exe 파일 다운로드 받아서 실행하면 화면이 나옵니다

add New Server 클릭 > General 설정

Connection 설정

SSH Tunnel 설정
원격서버에서 방화벽이나 ssh 설정을 미리 해주어야합니다.

연결 완료!
왼쪽 창을 통해서 Server연결과 DB, Table에 대해 탐색하면 됩니다.

참고)
PostgreSQL 설치 및 세팅 & pgAdmin 사용법 - Windows
pgAdmin4 및 DBeaver에서 원격 데이터베이스에 연결하는 방법
'개발일지' 카테고리의 다른 글
| [postgreSQL] 한글 TXT 또는 CSV 데이터 import하기 (1) | 2023.09.15 |
|---|---|
| [postgreSQL] 우분투(Ubuntu 20.04)에서 dbf파일 import 하기 (2) | 2023.09.14 |
| [Elasticsearch] 검색 쿼리 단어 중 특정 단어에 가중치 - multi_match, match, should (1) | 2023.05.01 |
| [NLP] Kiwi 설치와 keyBert 한글 키워드 추출 (1) | 2023.04.28 |
| [TextRank] KR-WordRank 한국어 키워드 추출 (1) | 2023.04.27 |
- Total
- Today
- Yesterday
- 지식그래프
- TextRank
- vertorsearch
- vscode
- python
- geospy
- SPARQL
- ChatGPT
- cursorai
- docker
- vervel
- Postgis
- Encoding
- vectorsearch
- rdflib
- rdffox
- deepseek
- Vue3
- Claude
- pandas
- 키워드추출
- MongoDB
- pdfmathtranslate
- LLM
- PEFT
- PostgreSQL
- polars
- Kafka
- hadoop
- AWS
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |