https://www.postgresql.org/download/linux/redhat/
#상황에 따라 sudoers 권한을 가진 계정으로 전환
# root 계정으로 전환 (환경에 따라 알맞은 계정으로 접속)
su -
# rpm repository 경로를 지정하여 설치 (위 url 참고)
sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-10-x86_64/pgdg-redhat-repo-latest.noarch.rpm
###### 위 설치 혹은 이후 명령에서 오류가 나타나면
###### 아래와 같이 문제가 된 부분을 비활성화 해준다.
###### 각 오류 메세지에 맞게끔 명령어를 변경
#오류 내용 예시
#PostgreSQL common testing RPMs for RHEL / Rocky / AlmaLinux 9 - x86_64
#Errors during downloading metadata for repository 'pgdg-common-testing':
sudo dnf config-manager --disable pgdg-common-testing
sudo dnf config-manager --disable pgdg13-updates-testing
sudo dnf config-manager --disable pgdg14-updates-testing
sudo dnf config-manager --disable pgdg15-updates-testing
sudo dnf clean all
sudo dnf makecache
###### 여기까지 첫번째 설치 문제 시 실행 과정
# 오류 해결 후 재설치 진행 (오류가 났었던 부분 부터 재실행)
sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-10-x86_64/pgdg-redhat-repo-latest.noarch.rpm
# Disable the built-in PostgreSQL module:
sudo dnf -qy module disable postgresql
# Install PostgreSQL:
sudo dnf install -y postgresql17-server
# Optionally initialize the database and enable automatic start:
sudo /usr/pgsql-17/bin/postgresql-17-setup initdb
sudo systemctl enable postgresql-17
sudo systemctl start postgresql-17
sudo systemctl status postgresql-17
기본 설치 완료.
2편에 계속
728x90
반응형
'PostgreSQL > install' 카테고리의 다른 글
5. PostgreSQL RHEL 설치: 테이블 스페이스 용 디스크 마운트 (0) | 2025.01.08 |
---|---|
4. PostgreSQL RHEL 설치: 사용자 생성 및 패스워드 설정 (0) | 2025.01.08 |
3. PostgreSQL RHEL 설치: 데이터베이스 접속 허용 및 방화벽 설정 (0) | 2025.01.07 |
2. PostgreSQL RHEL 설치: OS 사용자 계정 전환 후 CLI 접속 (1) | 2025.01.07 |
PostgreSQL JDBC 드라이버 다운로드 주소 (1) | 2025.01.03 |