1. PostgreSQL Repository 추가
ubuntu@instance-20240916-2008:~$ sudo apt update
ubuntu@instance-20240916-2008:~$ sudo apt install gnupg2 wget vim
ubuntu@instance-20240916-2008:~$ sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
ubuntu@instance-20240916-2008:~$ curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg
ubuntu@instance-20240916-2008:~$ sudo apt update
2. postgres 16 설치
ubuntu@instance-20240916-2008:~$ sudo apt install postgresql-16 postgresql-contrib-16
ubuntu@instance-20240916-2008:~$ systemctl status postgresql
● postgresql.service - PostgreSQL RDBMS
Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset>
Active: active (exited) since Mon 2024-09-16 15:13:29 UTC; 3min 5s ago
Main PID: 7058 (code=exited, status=0/SUCCESS)
CPU: 2ms
Sep 16 15:13:29 instance-20240916-2008 systemd[1]: Starting PostgreSQL RDBMS...
Sep 16 15:13:29 instance-20240916-2008 systemd[1]: Finished PostgreSQL RDBMS.
3. 실행
ubuntu@instance-20240916-2008:~$ sudo -i -u postgres
postgres@instance-20240916-2008:~$
postgres@instance-20240916-2008:~$ psql
psql (16.4 (Ubuntu 16.4-1.pgdg22.04+1))
Type "help" for help.
postgres=#
'Server > Oracle Cloud Infrastructure' 카테고리의 다른 글
[Oracle] oracle authenticator app change phone (0) | 2024.10.25 |
---|---|
[Oracle] postgreSQL 14 install (Ubuntu 20.04) (0) | 2022.10.12 |
[Oracle] redis install (Ubuntu 20.04) (0) | 2022.10.11 |
[Oracle] Golang install (Ubuntu 20.04) (0) | 2022.10.01 |
[Oracle] net-tools (Ubuntu 20.04) (0) | 2022.10.01 |