CentOS 7에서 PostgreSQL 10.2, PostGIS 2.4.3 설치(인터넷 환경)

# postgresql10, postgis YUM 저장소 업데이트
rpm -Uvh https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm

위의 url은 변경될 수 있으며 2020년 8월 31일에는 rpm -Uvh https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm로 하여 설치를 진행했으며, postgresql은 10.10.14를, postgis는 3.0.2를 설치하였음.

# 데이터베이스 설치
yum install postgresql10-server.x86_64 postgresql10

# 데이터베이스 저장소 생성
cd /usr/pgsql-10/bin/
./postgresql-10-setup initdb

# 서비스 실행
systemctl enable postgresql-10
systemctl enable postgresql-10.service
systemctl start postgresql-10.service

# 5432 포트 방화벽 허용
firewall-cmd –zone=public –add-port=5432/tcp

# 외부 접속 허용
cd /var/lib/pgsql/10/data
vi postgresql.conf
(편집 내용)
listen_address = “*”

# 암호설정
su – postgres
psql
\password postgres
\q
su – root

# 외부 접속을 위한 보안 설정
cd /var/lib/pgsql/10/data
vi pg_hba.conf
(편집 내용)
local all all peer 문자열을 local all all md5 로 변경
host all all 127.0.0.1/32 ident 문자열을 host all all 0.0.0.0/0 md5 로 변경
host all all ::1/128 ident 문자열을 host all all ::1/128 md5 로 변경

# PostGIS 설치
yum install epel-release
yum install postgis24_10.x86_64
systemctl restart postgresql-10.service

“CentOS 7에서 PostgreSQL 10.2, PostGIS 2.4.3 설치(인터넷 환경)”에 대한 4개의 댓글

    1. 영락아, 잘지내지?
      댓글 남긴거 잘봤어~
      이 사이트가 워드프레스로 만들어진거 설치만하고 그대로 사용하고 있는지라..
      그런 문제가 있는지 나두 몰랐어..
      형은 성수역에 있어, 언제 놀러와~
      조만간 연락하마~

  1. 형님 안녕하세요.. 참고 잘했습니당!! ㅎㅎ
    방화벽 셋팅하는 부분은 게시글 에디터에 오류가 있나봐요.. dash 2번입력한게 자동 치환되는 듯??
    언제 한번 뵈용 형님

서영락에 답글 남기기 응답 취소

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다