オンプレミスLinux

この項では、Oracle Management Agentを設定し、インストール・スクリプトを使用してオンプレミスLinuxホストにJMSプラグインをデプロイするステップについて説明します。

前提条件:

sudoまたは管理アクセス権を使用してインストール・スクリプトを実行します。

ノート

デフォルトでは、インストール・スクリプトは次のようになります。
  • WebLogicやTomcatなどのアプリケーション・サーバーで実行されているアプリケーションをより適切に識別するために、user.nameプロパティを収集する追加機能を備えたJava Usage Trackerプロパティ・ファイルを作成または更新します。この機能を有効にしない場合は、--enable-user-name=false引数を指定してインストール・スクリプトを実行します。Java Usage Trackerプロパティ・ファイルを後で変更して、additionalPropertiesセクションにuser.nameを追加または削除できます。
  • プラグインの連邦情報処理標準(FIPS)モードを無効にします。

    プラグインは、システム環境変数ENV_AGENT_PLUGIN_FIPS_APPROVEDを読み取り、見つかった場合はプラグインのFIPSモードを有効にします。USGovリラム。この変数を作成または変更するには、--enable-fips-mode=true引数を指定してインストール・スクリプトを実行します。

  • MACS default telemetry frequencyを使用してエージェントをインストールします。

--helpコマンドを実行して、ユーザー名、プロキシ設定、FIPSなどを有効化または無効化するオプションの説明を表示します。

次に、説明とともにオプション・パラメータを示します。

-u, --uninstall               Uninstall plug-ins, delete configuration files or restore originals from backups and exit.
-r, --reinstall               Uninstall plug-ins, delete configuration files or restore originals from backups and continue installation.
-h, --help                    Print usage message end exit.
--diagnostic                  Determines if prerequisite conditions are met on the host machine to allow for successful agent installation or upgradation, and plug-in deployment. 
                              Installation attempt will be skipped.
--enable-user-name            Generate usage tracker with additional functionality to collect the 'user.name' property for better identification 
                              of applications running on Application Servers like WebLogic and Tomcat servers. 
                              Default value is 'true'. 
--enable-fips-mode            Enable FIPS mode for plug-ins in USGov realms.
                              Format is --enable-fips-mode=true|false (for example, --enable-fips-mode=false).
                              Modify /etc/environment and create a line with ENV_AGENT_PLUGIN_FIPS_APPROVED=true or false.
                              Default value is false.
--install-management-agent    Installation of OMA on the OCI compute instance.                               
--uninstall-management-agent  Uninstallation of OMA on the OCI compute instance.                                
--reinstall-management-agent  Force OMA installation on the OCI compute instance and remove existing OMA.                               
--ignore-unsupported          The setup will proceed on an unsupported platform. 
                              Installation might be successful, but not all functionality might work as intended.
--proxy-host                  Add proxy host to curl commands, add or replace line 'ProxyHost = VALUE' in install key before Management Agent setup.
                              Format is --proxy-host="VALUE" (for example, --proxy-host="100.0.0.10").
                              Default is no proxy.
--proxy-port                  Add proxy port to curl commands, add or replace line 'ProxyPort = VALUE' in install key before Management Agent setup.
                              Format is --proxy-port="VALUE" (for example, --proxy-port="8050").
--proxy-user                  Add proxy user to curl commands, add or replace line 'ProxyUser = VALUE' in install key before Management Agent setup.
                              Format is --proxy-user="VALUE" (for example, --proxy-user="opc").
--proxy-password              Add proxy password to curl commands, add or replace line 'ProxyPassword = VALUE' in install key before Management Agent setup.
                              Format is --proxy-password="VALUE" (for example, --proxy-password="example").
--proxy-realm                 Add or replace line 'ProxyRealm = VALUE' in install key before Management  Agent setup.
                              Format is --proxy-realm="VALUE" (for example, --proxy-realm="OC1").
--use-agent-installer-path    Path to management agent installation file if it isn't in the same folder as the install script.
--use-java-path               Specify the Oracle Java 8 installation path for agent installation.  
                              If the path is not specified, the script will attempt to find a suitable Oracle Java 8 installation path from the file system. 
                              Format is --use-java-path={CUSTOM_PATH}(for example, --use-java-path=/usr/java/jdk1.8.0_361)).    
--use-agent-display-name      Specify the name to be displayed on the MACS console of your Management Agent.
                              If the name is not specified, the script will generate the name automatically.  

ステップ

  1. (オプションの診断チェック)インストールスクリプトおよび管理エージェントソフトウェアを保存したフォルダに移動します。次のコマンドを使用してスクリプトを実行します。
    $ sudo bash ./JMS_YourFleetName_linux.sh --diagnostic
    オペレーティング・システムおよびエージェント・タイプに応じて、結果は次のようになります。

    診断に失敗しました:

    ======================================================================================================
    Diagnostic Summary
    ======================================================================================================
    Shell is supported? : Yes
    User has sudo/root privileges? : Yes
    Certified OS? : Yes
    Meets minimum disk requirements? : Yes
    Meets minimum memory requirements? : Yes
    Able to reach OCI https://oracle.com endpoint? : Yes
    Meets Java requirement? : Yes
    Valid Management Agent installer? : No    
       Found 2 files with 'oracle.mgmt_agent*.rpm' pattern in /home/opc folder.    
       Please, run script test_linux.sh again with --use-agent-installer-path parameter.
    Management Agent has been detected? : No
    ======================================================================================================
    Diagnostics have failed. Please resolve all issues and run script test_linux.sh again.
    診断は正常に完了:
    ======================================================================================================
    Diagnostic Summary
    ======================================================================================================
    Shell is supported? : Yes
    User has sudo/root privileges? : Yes
    Certified OS? : Yes
    Meets minimum disk requirements? : Yes
    Meets minimum memory requirements? : Yes
    Able to reach OCI https://oracle.com endpoint? : Yes
    Meets Java requirement? : Yes
    Valid Management Agent installer? : Yes
    Existing Management Agent has been detected? : Yes
    Existing Management Agent has JMS plugins? : Yes
    Existing Management Agent can be upgraded? : Yes
    ======================================================================================================
    Diagnostics have finished running and no error occurred.

    解決策または推奨事項を含む質問の完全なリストは、エージェント・インストール診断の実行を参照してください。

  2. インストールスクリプトおよび管理エージェントソフトウェアを保存したフォルダに移動します。次のコマンドを使用してスクリプトを実行します。
    $ sudo bash ./JMS_YourFleetName_linux.sh
    • インストールが成功すると、次のようなメッセージが表示されます。
      ...
      Management Agent installation has been completed.
      Management Agent plugin 'Java Management Service' installation has been completed.
      Management Agent plugin 'Java Usage Tracking' installation has been completed.
      Management Agent was successfully registered using key YourFleetName (ocid1.managementagentinstallkey.oc1.iad.<ocid hash>).Assigned JMS Fleet is YourFleetName (ocid1.jmsfleet.oc1.iad.<ocid hash>).
    • エージェントがすでにインストールされている場合、スクリプトはエージェント・ソフトウェアを最新バージョンに更新します(該当する場合)。JMSプラグインがまだデプロイされていない場合は、Java Usage TrackingおよびJava Management Serviceプラグインを「エージェント・ページを使用したサービス・プラグインのデプロイ」の説明に従って手動でデプロイします。または、JMSプラグイン・デプロイメントとともにエージェントを再インストールできます。--forceパラメータを指定してスクリプトを実行します。
  3. (オプション)管理エージェントが実行されているかどうかを確認するには、次のように入力します。
    $ sudo systemctl status mgmt_agent
    結果の表示内容は、次のとおりです。
    mgmt_agent.service - mgmt_agent
       Loaded: loaded (/etc/systemd/system/mgmt_agent.service; enabled; vendor preset: disabled)
       Active: active (running) since Wed 2022-08-24 07:05:38 GMT; 24s ago
      Process: 1772 ExecStart=/opt/oracle/mgmt_agent/agent_inst/bin/agentcore start sysd (code=exited, status=0/SUCCESS)
     Main PID: 1864 (wrapper)
       Memory: 414.6M
       CGroup: /system.slice/mgmt_agent.service
               ├─1864 /opt/oracle/mgmt_agent/agent_inst/bin/./wrapper /opt/oracle/mgmt_agent/agent_inst/bin/../config/wrapper.conf wrapper.syslog.ident=mgmt_agent wrapper.pidfile=/opt/oracle/mgmt_agent/agent_inst/bin/../log...
               └─2171 /usr/java/jdk1.8.0_301-amd64/bin/java -Dorg.tanukisoftware.wrapper.WrapperSimpleApp.maxStartMainWait=5 -Djava.security.egd=file:///dev/./urandom -XX:+HeapDumpOnOutOfMemoryError -Dpolyglot.engine.AllowE...
    
    Aug 24 07:05:21 name-agent-stage systemd[1]: Starting mgmt_agent...
    Aug 24 07:05:21 name-agent-stage agentcore[1772]: Removed stale pid file: /opt/oracle/mgmt_agent/agent_inst/bin/../log/mgmt_agent.pid
    Aug 24 07:05:21 name-agent-stage agentcore[1772]: Starting mgmt_agent...
    Aug 24 07:05:33 name-agent-stage agentcore[1772]: Waiting for mgmt_agent..............
    Aug 24 07:05:34 name-agent-stage sudo[2752]: mgmt_agent : TTY=unknown ; PWD=/opt/oracle/mgmt_agent/agent_inst/bin ; USER=root ; ENV=ORACLE_CLOUD_AGENT_PLUGIN_COOKIE=<Cookie_ID> LOGDIR=/opt/or...
    Aug 24 07:05:38 name-agent-stage systemd[1]: Started mgmt_agent. 

    コンソールを表示して、管理エージェントが実行中かどうかを確認することもできます。詳細は、「管理エージェント・コンソールの概要」を参照してください。

    ログ・ファイルは、/opt/oracle/mgmt_agent/plugins/jm/stateDir/logディレクトリにあります。