💾Data/🧩Database
PostgreSQL9.x Install
공개하기부끄러운블로그
2021. 1. 27. 14:11
반응형
OS : CentOS7.9
DB : PostgreSQL9.6
소개
PostgreSQL은 현재 높은 인기를 자랑하는 오픈소스 RDMBS이다.
오랜 역사와 많은 레퍼런스를 가지기 때문에 안정성에서도 많은 신뢰를 얻고있다.
국내에서는 MySQL을 많이 사용하지만 기업에서 배포하는 방식으로 사용 시 라이선스 문제가 있음.
Postgresql의 경우 BSD와 MIT와 비슷한 Liberal Open Source License를 따름
설치
# yum -y install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
# yum -y install postgresql96 postgresql96-server //96은 9.6버전을 의미하며 숫자를 바꿔서 버전을 선택하여 설치가 가능
위와같이 설치 완료 시 /etc/passwd에 postgres 계정이 생성되며, /var/lib/pgsql 에 설치가 된다.
PostgreSQL 초기화 및 데몬시작
# /usr/pgsql-9.6/bin/postgresql96-setup
# systemctl start postgresql-9.6 && systemctl enable postgresql-9.6
접속확인
# su - postgres
# psql
반응형