CentOS 8
Sponsored Link

初期設定 : モジュラーリポジトリ利用する
2019/09/25
 
2018/5 リリースの Fedora 28 から正式採用されているモジュラーリポジトリが RHEL 8 / CentOS 8 でも利用可能となっています。
[1] 利用可能なモジュールのリストを表示します。
[root@dlp ~]#
dnf module list

CentOS-8 - AppStream
Name                 Stream       Profiles                                 Summary                                          
389-ds               1.4                                                   389 Directory Server (base)                      
ant                  1.10 [d]     common [d]                               Java build tool                                  
container-tools      1.0          common [d]                               Common tools and dependencies for container runtimes
container-tools      rhel8 [d][e] common [d]                               Common tools and dependencies for container runtimes
freeradius           3.0 [d]      server [d]                               High-performance and highly configurable free RADIUS server
gimp                 2.8 [d]      common [d], devel                        gimp module                                      
go-toolset           rhel8 [d]    common [d]                               Go                                               

.....
.....

scala                2.10 [d]     common [d]                               A hybrid functional/object-oriented language for the JVM
squid                4 [d]        common [d]                               Squid - Optimising Web Delivery                  
subversion           1.10 [d]     common [d], server                       Apache Subversion                                
swig                 3.0 [d]      common [d], complete                     Connects C/C++/Objective C to some high-level programming languages
varnish              6 [d]        common [d]                               Varnish HTTP cache                               
virt                 rhel [d][e]  common [d]                               Virtualization module                            

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
[2] 利用可能なモジュールをインストールするには以下のように設定します。
# 例として PostgreSQL のモジュールリストを表示

[root@dlp ~]#
dnf module list postgresql

Name         Stream   Profiles             Summary
postgresql   10 [d]   client, server [d]   PostgreSQL server and client module
postgresql   9.6      client, server [d]   PostgreSQL server and client module

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

# PostgreSQL 10 をインストール

[root@dlp ~]#
dnf module install postgresql:10

Last metadata expiration check: 0:06:31 ago on Wed 25 Sep 2019 01:28:36 AM JST.
Dependencies resolved.
================================================================================
 Package            Arch    Version                            Repository  Size
================================================================================
Installing group/module packages:
 postgresql-server  x86_64  10.6-1.module_el8.0.0+15+f57f353b  AppStream  5.1 M
Installing dependencies:
 libpq              x86_64  10.5-1.el8                         AppStream  188 k
 postgresql         x86_64  10.6-1.module_el8.0.0+15+f57f353b  AppStream  1.5 M
Installing module profiles:
 postgresql/server
Enabling module streams:
 postgresql                 10

Transaction Summary
================================================================================
Install  3 Packages
.....
.....

# PostgreSQL が [e]nabled & [i]nstalled 状態となる

[root@dlp ~]#
dnf module list postgresql

CentOS-8 - AppStream
Name        Stream    Profiles               Summary
postgresql  10 [d][e] client, server [d] [i] PostgreSQL server and client module
postgresql  9.6       client, server [d]     PostgreSQL server and client module

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

[root@dlp ~]#
dnf module provides postgresql

postgresql-10.6-1.module_el8.0.0+15+f57f353b.x86_64
Module   : postgresql:10:8000020190628020724:55190bc5:x86_64
Profiles : client
Repo     : AppStream
Summary  : PostgreSQL server and client module

[root@dlp ~]#
postgres -V

postgres (PostgreSQL) 10.6
[3] インストール済みのモジュールを他バージョンに切り替えたい場合は以下のように設定します。
例として [2] でインストールした PostgreSQL 10 を PostgreSQL 9.6 に切り替えます。
[root@dlp ~]#
dnf module list postgresql

CentOS-8 - AppStream
Name        Stream    Profiles               Summary
postgresql  10 [d][e] client, server [d] [i] PostgreSQL server and client module
postgresql  9.6       client, server [d]     PostgreSQL server and client module

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

# 他バージョンに切り替えたい場合は一旦リセットする

[root@dlp ~]#
dnf module reset postgresql

# PostgreSQL 9.6 をインストール

[root@dlp ~]#
dnf module install postgresql:9.6
Last metadata expiration check: 0:13:48 ago on Wed 25 Sep 2019 01:28:36 AM JST.
Dependencies resolved.
================================================================================
 Package           Arch   Version                               Repository
                                                                           Size
================================================================================
Downgrading:
 postgresql        x86_64 9.6.10-1.module_el8.0.0+16+7a9f6089   AppStream 1.4 M
 postgresql-server x86_64 9.6.10-1.module_el8.0.0+16+7a9f6089   AppStream 5.0 M
Installing module profiles:
 postgresql/server
Enabling module streams:
 postgresql               9.6

Transaction Summary
================================================================================
Downgrade  2 Packages
.....
.....

# PostgreSQL 9.6 が [e]nabled 状態になる

[root@dlp ~]#
dnf module list postgresql

CentOS-8 - AppStream
Name        Stream   Profiles                Summary
postgresql  10 [d]   client, server [d]      PostgreSQL server and client module
postgresql  9.6 [e]  client, server [d] [i]  PostgreSQL server and client module

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

[root@dlp ~]#
dnf module provides postgresql

postgresql-9.6.10-1.module_el8.0.0+16+7a9f6089.x86_64
Module   : postgresql:9.6:8000020190628020724:55190bc5:x86_64
Profiles : client
Repo     : AppStream
Summary  : PostgreSQL server and client module

[root@dlp ~]#
postgres -V

postgres (PostgreSQL) 9.6.10
関連コンテンツ