728x90
adduser postgres
sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
sudo dnf -qy module disable postgresql
sudo dnf install -y postgresql16-server
sudo /usr/pgsql-16/bin/postgresql-16-setup initdb
sudo systemctl enable postgresql-16
sudo systemctl start postgresql-16
sudo systemctl status postgresql-16
[root@localhost yum.repos.d]# sudo systemctl start postgresql-16
[root@localhost yum.repos.d]# sudo systemctl status postgresql-16
● postgresql-16.service - PostgreSQL 16 database server
Loaded: loaded (/usr/lib/systemd/system/postgresql-16.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2025-09-11 21:52:34 KST; 6s ago
Docs: https://www.postgresql.org/docs/16/static/
Process: 140245 ExecStartPre=/usr/pgsql-16/bin/postgresql-16-check-db-dir ${PGDATA} (code=exited, status=0/SUCCESS)
Main PID: 140251 (postgres)
Tasks: 7 (limit: 49440)
Memory: 17.7M
CGroup: /system.slice/postgresql-16.service
├─140251 /usr/pgsql-16/bin/postgres -D /var/lib/pgsql/16/data/
├─140252 postgres: logger
├─140253 postgres: checkpointer
├─140254 postgres: background writer
├─140256 postgres: walwriter
├─140257 postgres: autovacuum launcher
└─140258 postgres: logical replication launcher
Sep 11 21:52:34 localhost.localdomain systemd[1]: Starting PostgreSQL 16 database server...
Sep 11 21:52:34 localhost.localdomain postgres[140251]: 2025-09-11 21:52:34.390 KST [140251] LOG: redirecting log o>
Sep 11 21:52:34 localhost.localdomain postgres[140251]: 2025-09-11 21:52:34.390 KST [140251] HINT: Future log outpu>
Sep 11 21:52:34 localhost.localdomain systemd[1]: Started PostgreSQL 16 database server.
[root@localhost yum.repos.d]# su - postgres
[postgres@localhost ~]$ psql
psql (16.10)
Type "help" for help.728x90
'IT 관련 > PostgreSQL' 카테고리의 다른 글
| [PostgreSQL] idle session 정리 (pg_terminate_backend(pid) / 프로세스 kill (0) | 2026.02.10 |
|---|---|
| [PostgreSQL] pgbench 테스트 하는법 (0) | 2025.09.15 |
| [PostgreSQL] rhel7.9 에서 PostgreSQL-15 설치하는 법 (0) | 2025.09.11 |
| OLTP or OLAP-MPP-DW 비교 및 관계 (0) | 2025.01.17 |
| PostgreSQL vs Oracle 이중화 차이점 (0) | 2025.01.16 |