728x90
# RHEL 9.2용 표준 레포지토리 직접 생성 (Rocky 9 미러 활용)
sudo tee /etc/yum.repos.d/rhel9.repo <<'EOF'
[baseos]
name=Rocky Linux 9 - BaseOS
baseurl=https://dl.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/
gpgcheck=0
enabled=1
[appstream]
name=Rocky Linux 9 - AppStream
baseurl=https://dl.rockylinux.org/pub/rocky/9/AppStream/x86_64/os/
gpgcheck=0
enabled=1
[crb]
name=Rocky Linux 9 - CRB
baseurl=https://dl.rockylinux.org/pub/rocky/9/CRB/x86_64/os/
gpgcheck=0
enabled=1
EOF
# 캐시 초기화 및 레포지토리 인식 확인
sudo dnf clean all
sudo dnf makecache
# 1. PostgreSQL 공식 저장소(Repository) 추가
sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm
# 1. 내장 모듈 비활성화 (기존 버전과의 충돌 방지)
sudo dnf -qy module disable postgresql
# 2. 요청하신 4가지 패키지 특정 버전 설치
# postgresql16 (클라이언트), server (엔진), libs (라이브러리), contrib (추가 도구)
sudo dnf install -y \
postgresql16-16.1-2PGDG.rhel9.x86_64 \
postgresql16-server-16.1-2PGDG.rhel9.x86_64 \
postgresql16-libs-16.1-2PGDG.rhel9.x86_64 \
postgresql16-contrib-16.1-2PGDG.rhel9.x86_64 \
--allowerasing
# 3. 데이터베이스 초기화
sudo /usr/pgsql-16/bin/postgresql-16-setup initdb
# 4. 서비스 등록 및 시작
sudo systemctl enable postgresql-16
sudo systemctl start postgresql-16
# 5. 최종 버전 및 상태 확인
sudo systemctl status postgresql-16 --no-pager
sudo su - postgres -c "psql --version"728x90
'IT 관련 > PostgreSQL' 카테고리의 다른 글
| [PostgreSQL] 설정된 max_connections 대비 현재 연결 Session 비율 확인 (0) | 2026.02.23 |
|---|---|
| [PostgreSQL] idle session 정리 (pg_terminate_backend(pid) / 프로세스 kill (0) | 2026.02.10 |
| [PostgreSQL] pgbench 테스트 하는법 (0) | 2025.09.15 |
| [PostgreSQL] rhel8.7 에서 PostgreSQL-16 설치하는 법 (0) | 2025.09.11 |
| [PostgreSQL] rhel7.9 에서 PostgreSQL-15 설치하는 법 (0) | 2025.09.11 |