클라우드 및 인프라/Linux
centos7 postgresql 설치하기
작은소행성
2021. 5. 12. 18:14
1. 필요한 파일 검색
https://www.postgresql.org/download/linux/redhat/
저장소 설치
sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
2.
설치 가능 패키지 검색
sudo yum list postgres*
3.
[root@onypoc ~]# yum install postgresql11-libs.x86_64 postgresql11.x86_64 postgresql11-contrib.x86_64 postgresql11-server.x86_64
4.
db생성
sudo /usr/pgsql-11/bin/postgresql-11-setup initdb
5.
sudo systemctl restart postgresql-11.service
sudo systemctl enable postgresql-11.service
6.
netstat -tnlp
7.
접속 명령어
sudo -u postgres psql
8.
sudo -u postgres psql
접속 후
비밀번호 설정
\password postgres
db생성
sudo /usr/pgsql-11/bin/postgresql-11-setup initdb
sql 시작
부팅시 자동시작
host all all 0.0.0.0/0 password
반응형