IT Curation 자세히보기

infra&system/postgreSQL

postgrSQL-13 설치 및 외부접속 설정

icf_ 2023. 4. 14. 15:42

OS는 centOS7사용.

방화벽 포트 5432/tcp 오픈

설치중 좀 어이없는 상황이 발생해서 정리...

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 postgresql13-server
sudo /usr/pgsql-13/bin/postgresql-13-setup initdb
sudo systemctl enable postgresql-13
sudo systemctl start postgresql-13

설치를 하고 난뒤 initdb가 안되는 문제가 발생하였음...

다음과 같은 명령어로 생성가능한데 이것도 오류가 발생하는 경우가 있음.

sudo /usr/pgsql-13/bin/postgresql-13-setup initdb

오류 메세지 : Data directory is not empty!

이런 오류가 발생해서

/var/lib/pgsql/13 폴더를 삭제하고 다시 명령어 실행하여 해결.

환경변수는 .bash_profile에 설정하였음.

외부접속 설정은 아래내용 참조

https://2ster.tistory.com/169

728x90

'infra&system > postgreSQL' 카테고리의 다른 글

postgreSQL13.8 수동설치  (0) 2023.04.17
postgrSQL-14 설치 및 외부접속 설정  (0) 2023.04.09