# 설치환경
- Centos 7.x
# 설치버전
- Posgres 11.x
# yum 설치를 위한 repo 다운로드
> yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
# 서버 설치
> yum yum install postgresql11-server
# 클라이언트 설치
> yum install postgresql11
# 설치 후 서버 시작
> /usr/pgsql-11/bin/postgresql-11-setup initdb
> systemctl enable postgresql-11
> systemctl start postgresql-11
# 설치 후 접속하기
# 설치 기본 위치로 이동 ( systemctl status postgresql-11 상태에서 설치위치를 알수있음)
> cd /var/lib/pgsql/12/data
# 설정환경파일 수정
> vi pg_hba.conf 에서 아래 내용 추가
hostnossl all all 0.0.0.0/0 md5
> vi postgresql.conf 에서 아래 내용으로 수정
listen_addresses = '*'
# 서버 재시작
> systemctl stop | start postgresql-11
# 패스워드 변경
> sudo -u postgres psql postgres
접속 성공 후 다음과 같이 입력
postgres=# \password postgres
비밀번호입력
비밀번호확인
# 접속 확인
# 설치 관련 참조 문서
https://www.postgresql.org/download/linux/redhat/
'DB 일반' 카테고리의 다른 글
MariaDB의 Maxscale 구성 하기 (0) | 2020.04.10 |
---|---|
Mariadb Galera Cluster 구성 (0) | 2020.04.10 |