0. 개발환경
- Ubuntu 버전: 18.04
- PostgreSQL 버전: 15
1. postgresql debian packages key 및 repository 추가
sudo apt-get install wget ca-certificates
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
2. apt-get 업데이트 및 postgresql 특정 버전 설치
sudo apt-get update
sudo apt-get install postgresql postgresql-15
3. Postgresql 서비스 등록 및 활성화 확인
systemctl status postgresql
결과예시:
-> Ubuntu에 postgresql.service로 등록되며, 설치 완료 후 자동으로 Active 상태가 활성화된 것을 확인 할 수 있다.
'DataBase > PostgreSql' 카테고리의 다른 글
[PostgreSQL] Ubuntu에 pgAdmin4 설치 (0) | 2023.01.23 |
---|---|
[PostgreSQL] PostgreSQL 버전확인 명령어 (0) | 2023.01.23 |
[PostgreSQL] PostgreSQL 서비스 관리(상태조회, 시작, 중지, 재시작 등...) 명령어 정리 (0) | 2023.01.23 |
[PostgreSQL]Ubuntu에서 PostgreSQL 완전 삭제 (0) | 2023.01.23 |