728x90
반응형
PostgreSQL 10에서 PostgreSQ 13 설치하기
Rocky8.9 에서 Netbox 설치중에 Postgresql 버젼이 낮아 설치가 되지 않아
PostgreSQL10을 삭제하고 Postgresql 13으로 다시 설치 하는 로그(방법)
# 해당 에러 로그
raise NotSupportedError(
django.db.utils.NotSupportedError: PostgreSQL 12 or later is required (found 10.23).
# psql -V
psql (PostgreSQL) 10.23
# sudo systemctl stop postgresql
# sudo systemctl list-unit-files postgresql*
UNIT FILE STATE
postgresql.service enabled
postgresql@.service disabled
2 unit files listed.
# sudo systemctl disable postgresql
Removed /etc/systemd/system/multi-user.target.wants/postgresql.service.
# rm -rf /var/lib/pgsql
# userdel postgres
# groupdel postgres
groupdel: group 'postgres' does not exist
# yum list installed *postgres*
Installed Packages
postgresql.x86_64 10.23-4.module+el8.9.0+1734+74bd286c @appstream
postgresql-server.x86_64 10.23-4.module+el8.9.0+1734+74bd286c @appstream
# yum remove *postgre*
Dependencies resolved.
===================================================================================================================================
Package Architecture Version Repository Size
===================================================================================================================================
Removing:
postgresql x86_64 10.23-4.module+el8.9.0+1734+74bd286c @appstream 5.5 M
postgresql-server x86_64 10.23-4.module+el8.9.0+1734+74bd286c @appstream 20 M
Transaction Summary
===================================================================================================================================
Remove 2 Packages
Freed space: 26 M
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Running scriptlet: postgresql-server-10.23-4.module+el8.9.0+1734+74bd286c.x86_64 1/1
Running scriptlet: postgresql-server-10.23-4.module+el8.9.0+1734+74bd286c.x86_64 1/2
Erasing : postgresql-server-10.23-4.module+el8.9.0+1734+74bd286c.x86_64 1/2
warning: file /var/lib/pgsql: remove failed: No such file or directory
Running scriptlet: postgresql-server-10.23-4.module+el8.9.0+1734+74bd286c.x86_64 1/2
Erasing : postgresql-10.23-4.module+el8.9.0+1734+74bd286c.x86_64 2/2
Running scriptlet: postgresql-10.23-4.module+el8.9.0+1734+74bd286c.x86_64 2/2
Verifying : postgresql-10.23-4.module+el8.9.0+1734+74bd286c.x86_64 1/2
Verifying : postgresql-server-10.23-4.module+el8.9.0+1734+74bd286c.x86_64 2/2
Removed:
postgresql-10.23-4.module+el8.9.0+1734+74bd286c.x86_64 postgresql-server-10.23-4.module+el8.9.0+1734+74bd286c.x86_64
Complete!
dnf 로 Postgresql 설정 변경
dnf 로 Postgresql 10으로 설치했으면 다시 13으로 설치하려면 에러가 난다.
이런경우 dnf reset 명령어를 통하여 다시 설정 및 설치하는 방법이다.
# postgresql 10으로 설정되어 있음
# sudo dnf module list postgresql
Rocky Linux 8 - AppStream 5.9 kB/s | 4.8 kB 00:00
Rocky Linux 8 - BaseOS 3.9 kB/s | 4.3 kB 00:01
Rocky Linux 8 - Extras 3.1 kB/s | 3.1 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 4.6 kB/s | 5.1 kB 00:01
Rocky Linux 8 - AppStream
Name Stream Profiles Summary
postgresql 9.6 client, server [d] PostgreSQL server and client module
postgresql 10 [d][e] client, server [d] PostgreSQL server and client module
postgresql 12 client, server [d] PostgreSQL server and client module
postgresql 13 client, server [d] PostgreSQL server and client module
postgresql 15 client, server [d] PostgreSQL server and client module
postgresql 16 client, server [d] PostgreSQL server and client module
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
# postgresql 13을 설치하면 module을 reset하라고 함
# sudo dnf module enable postgresql:13
Last metadata expiration check: 0:00:58 ago on Sat 01 Jun 2024 02:47:38 PM KST.
Dependencies resolved.
The operation would result in switching of module 'postgresql' stream '10' to stream '13'
Error: It is not possible to switch enabled streams of a module unless explicitly enabled via configuration option module_stream_switch.
It is recommended to rather remove all installed content from the module, and reset the module using 'dnf module reset <module_name>' command. After you reset the module, you can install the other stream.
# sudo dnf module reset postgresql
Rocky Linux 8 - AppStream 3.7 kB/s | 4.8 kB 00:01
Rocky Linux 8 - BaseOS 5.2 kB/s | 4.3 kB 00:00
Rocky Linux 8 - Extras 2.7 kB/s | 3.1 kB 00:01
Extra Packages for Enterprise Linux 8 - x86_64 3.2 kB/s | 5.1 kB 00:01
Dependencies resolved.
===================================================================================================================================
Package Architecture Version Repository Size
===================================================================================================================================
Resetting modules:
postgresql
Transaction Summary
===================================================================================================================================
Is this ok [y/N]: y
Complete!
ation check: 0:03:14 ago on Sat 01 Jun 2024 02:53:04 PM KST.
Dependencies resolved.
===================================================================================================================================
Package Architecture Version Repository Size
===================================================================================================================================
Enabling module streams:
postgresql 13
Transaction Summary
===================================================================================================================================
Is this ok [y/N]: y
Complete!
]# sudo dnf install postgresql-server
Last metadata expiration check: 0:03:46 ago on Sat 01 Jun 2024 02:53:04 PM KST.
Dependencies resolved.
===================================================================================================================================
Package Architecture Version Repository Size
===================================================================================================================================
Installing:
postgresql-server x86_64 13.14-1.module+el8.9.0+1736+ef8fa13a appstream 5.6 M
Installing dependencies:
libicu x86_64 60.3-2.el8_1 baseos 8.8 M
postgresql x86_64 13.14-1.module+el8.9.0+1736+ef8fa13a appstream 1.5 M
Transaction Summary
===================================================================================================================================
Install 3 Packages
Total download size: 16 M
Installed size: 59 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): postgresql-13.14-1.module+el8.9.0+1736+ef8fa13a.x86_64.rpm 4.8 MB/s | 1.5 MB 00:00
(2/3): postgresql-server-13.14-1.module+el8.9.0+1736+ef8fa13a.x86_64.rpm 7.4 MB/s | 5.6 MB 00:00
(3/3): libicu-60.3-2.el8_1.x86_64.rpm 3.9 MB/s | 8.8 MB 00:02
-----------------------------------------------------------------------------------------------------------------------------------
Total 2.7 MB/s | 16 MB 00:05
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : libicu-60.3-2.el8_1.x86_64 1/3
Running scriptlet: libicu-60.3-2.el8_1.x86_64 1/3
Installing : postgresql-13.14-1.module+el8.9.0+1736+ef8fa13a.x86_64 2/3
Running scriptlet: postgresql-server-13.14-1.module+el8.9.0+1736+ef8fa13a.x86_64 3/3
Installing : postgresql-server-13.14-1.module+el8.9.0+1736+ef8fa13a.x86_64 3/3
Running scriptlet: postgresql-server-13.14-1.module+el8.9.0+1736+ef8fa13a.x86_64 3/3
Verifying : postgresql-13.14-1.module+el8.9.0+1736+ef8fa13a.x86_64 1/3
Verifying : postgresql-server-13.14-1.module+el8.9.0+1736+ef8fa13a.x86_64 2/3
Verifying : libicu-60.3-2.el8_1.x86_64 3/3
Installed:
libicu-60.3-2.el8_1.x86_64 postgresql-13.14-1.module+el8.9.0+1736+ef8fa13a.x86_64
postgresql-server-13.14-1.module+el8.9.0+1736+ef8fa13a.x86_64
Complete!
# sudo postgresql-setup --initdb
* Initializing database in '/var/lib/pgsql/data'
* Initialized, logs are in /var/lib/pgsql/initdb_postgresql.log
# systemctl start postgresql
# systemctl enable postgresql
# systemctl status postgresql
728x90
반응형
LIST
'postgreSQL MariaDB' 카테고리의 다른 글
[MariaDB] Maria DB 명령어 (1) | 2024.04.06 |
---|---|
EDB v15.2 설치(RockyOS 9 기준), PostgreSQL (0) | 2023.11.18 |
EDB v14설치 및 EDB-PEM(Postgres Enterprise Manager 설치) (0) | 2023.11.18 |