2.5.3.1 Oracle Autonomous Health Frameworkに自動的にパッチを適用するAHFCTL更新コマンドの実行

updatesetupdategetupdateおよびunsetupdateコマンドを実行するには、AHFインストール・ユーザー権限が必要です。

2.5.3.1.1 ahfctl update

ahfctl updateコマンドを使用して、AHF更新を自動的に適用します。

ノート:

ahfctl updateコマンドを実行するには、AHFインストール・ユーザー権限が必要です。

注意:

ダウンロードしたファイルは、本番にマウントされているファイルシステムにコピーする前に、必ず本番前システムでそのメタデータをテストしてください。
  1. ステージング・サーバーで自動ダウンロードを構成します。
  2. ダウンロードしたメタデータを本番前システムでテストします。
  3. すべての本番システムで自動更新を構成します。
  4. 本番にマウントされているファイル・システムにそのテスト・メタデータzipをコピーして、更新を自動的に適用します。

構文

ahfctl update 
[-h] 
[-nomos] 
[-debug]

パラメータ

表2-1 ahfctl updateコマンドのパラメータ

パラメータ 説明

-nomos

MOSを構成しないように指定します。

-debug

デバッグを有効にするには、-debugオプションを指定します。

例2-15 ソフトウェア・ステージングの場所で新しいAHFメタデータ更新が使用可能な場合

ahfctl update
Updated file /opt/oracle.ahf/exachk/.cgrep/versions.dat
Updated file /opt/oracle.ahf/exachk/rules.dat
Updated file /opt/oracle.ahf/exachk/.cgrep/collections.dat
Updated file /opt/oracle.ahf/exachk/messages/check_messages.json
Data files updated to 20220607 from 20220516
Please copy ahf_data_20220607.zip and run the command 'ahfctl applyupdate -updatefile ahf_data_20220607.zip' on the below mentioned nodes
scao05adm08

例2-16 RESTエンドポイント・パラメータが構成され、新しいAHFメタデータ更新がRESTエンドポイントで使用可能な場合

ahfctl update
Applying AHF metedata update...
AHF update zip is not available at stage location /opt/rajeev
Upload configuration check for: ahf_update_loc.
Parameters are configured correctly to upload.
ahf_data_20220607.zip successfully downloaded at /opt/rajeev
Updated file /opt/oracle.ahf/exachk/.cgrep/versions.dat
Updated file /opt/oracle.ahf/exachk/rules.dat
Updated file /opt/oracle.ahf/exachk/.cgrep/collections.dat
Updated file /opt/oracle.ahf/exachk/messages/check_messages.json
Data files updated to 20220607 from 20220601
Please copy ahf_data_20220607.zip and run the command 'ahfctl applyupdate -updatefile ahf_data_20220607.zip' on the below mentioned nodes
scao05adm08

2.5.3.1.2 ahfctl setupdate

ahfctl setupdateコマンドを使用して、更新パラメータを設定します。

ノート:

ahfctl setupdateコマンドを実行するには、AHFインストール・ユーザー権限が必要です。

構文

ahfctl setupdate 
[-h] 
[-all] 
[-swstage SWSTAGE] 
[-autoupdate AUTOUPDATE] 
[-servicename SERVICENAME] 
[-fstype FSTYPE] 
[-frequency FREQUENCY]

パラメータ

表2-2 ahfctl setupdateコマンドのパラメータ

パラメータ 説明

-all

すべてのパラメータを構成するように指定します。

-swstage SWSTAGE

ソフトウェア・ステージングの場所を指定します(たとえば、/opt/oracle.ahf)。

-autoupdate AUTOUPDATE

自動更新を有効または無効にするように指定します。デフォルト: on。有効な値: on|off

-servicename SERVICENAME

RESTダウンロード・サービスの名前を指定します。デフォルト: ahf_update_loc

-fstype FSTYPE

ステージングの場所のファイル・システム・タイプ(nfs/acfs/localなど)を指定します。

-frequency FREQUENCY

自動更新の頻度を日数の範囲(1から30)で指定します(例: 15)。

-debug

デバッグを有効にするには、-debugオプションを指定します。

例2-17 更新構成の設定

ahfctl setupdate -swstage /opt/oracle.ahf -autoupdate on

例2-18 すべての更新パラメータの設定

ahfctl setupdate -all
Enter autoupdate flag <on/off> : on
Enter software stage location : /scratch/ahf_stage
Enter auto update frequency : 30
AHF autoupdate parameters successfully updated
Successfully synced AHF configuration

例2-19 自動更新の無効化

ahfctl setupdate -autoupdate off
AHF autoupdate parameters successfully updated
Successfully synced AHF configuration

2.5.3.1.3 ahfctl getupdate

ahfctl getupdateコマンドを使用して、更新パラメータを取得します。

ノート:

ahfctl getupdateコマンドを実行するには、AHFインストール・ユーザー権限が必要です。

構文

ahfctl getupdate 
[-h] 
[-all] 
[-debug]

パラメータ

表2-3 ahfctl getupdateコマンドのパラメータ

パラメータ 説明

-all

すべてのパラメータを取得するように指定します。

-debug

デバッグを有効にするには、-debugオプションを指定します。

例2-20 すべての更新パラメータの取得

ahfctl getupdate -all
autoupdate : on
autoupdate.swstage : /opt/oracle.ahf
autoupdate.frequency : 30
autoupdate.servicename : [not set]
autoupdate.fstype : [not set]

2.5.3.1.4 ahfctl unsetupdate

ahfctl unsetupdateコマンドを使用して、更新パラメータの設定を解除します。

ノート:

ahfctl unsetupdateコマンドを実行するには、AHFインストール・ユーザー権限が必要です。

構文

ahfctl setupdate 
[-h] 
[-all] 
[-swstage SWSTAGE] 
[-autoupdate AUTOUPDATE] 
[-servicename SERVICENAME] 
[-fstype FSTYPE] 
[-frequency FREQUENCY]

パラメータ

表2-4 ahfctl setupdateコマンドのパラメータ

パラメータ 説明

-all

すべてのパラメータの設定を解除するように指定します。

-swstage SWSTAGE

ソフトウェア・ステージングの場所の設定を解除するように指定します。

-autoupdate AUTOUPDATE

自動更新フラグの設定を解除するように指定します。

-servicename SERVICENAME

RESTダウンロード・サービス名の設定を解除するように指定します。

-fstype FSTYPE

ステージングの場所のファイル・システム・タイプの設定を解除するように指定します。

-frequency FREQUENCY

自動更新の頻度の設定を解除するように指定します。

-debug

デバッグを有効にするには、-debugオプションを指定します。

例2-21 単一の更新パラメータの設定解除

ahfctl unsetupdate -swstage
Software stage location successfully removed
Successfully synced AHF configuration

例2-22 すべての更新構成の設定解除

ahfctl unsetupdate -all
AHF update parameters successfully removed
Successfully synced AHF configuration

2.5.3.1.5 更新の適用方法

新しいコンプライアンス・チェックおよびSRDCをMOS (My Oracle Support)またはRESTエンドポイントから自動的にダウンロードするようにAHFを構成します。

  1. MOS資格証明を構成します。

    たとえば:

    ahfctl setupload -name mosconf1 -type https
    Enter mosconf1.https.user : john.doe@acme.com
    Enter mosconf1.https.password :
    Enter mosconf1.https.url : https://transport.oracle.com/upload/issue
  2. 自動更新を構成します。

    たとえば:

    ahfctl setupdate -autoupdate on -swstage /my/staging/path -frequency 1
  3. 準備ができたら更新を適用します。
    ahfctl update