オンプレミス macOS

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

前提条件:

sudoまたは管理アクセス権を指定してインストール・スクリプトを実行し、フル・ディスク・アクセス権限を付与します。

ノート

デフォルトでは、インストール・スクリプトは次のようになります。
  • WebLogicやTomcatなどのアプリケーション・サーバーで実行されているアプリケーションをより適切に識別するために、user.nameプロパティを収集する追加機能を備えた使用状況トラッカを生成します。この機能を有効にしない場合は、インストール・スクリプトのパラメータ--enable-user-name=falseを更新します。将来、Java Usage Trackerプロパティ・ファイルを変更して、additionalPropertiesセクションに対してuser.nameを追加または削除できます。
  • プラグインの連邦情報処理標準(FIPS)モードを無効にします。USGovリラムでFIPSモードを有効にするには、インストール・スクリプトでパラメータ--enable-FIPS-mode=true を更新します。
  • JMSのテレメトリ頻度が低いエージェントをインストールします。

--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 in Application Servers like Weblogic and Tomcat servers.
                            If you want to disable this feature, update the parameter --enable-user-name=false in the installation script.
                            Alternatively, modify /Library/Application Support/Oracle/Java/usagetracker.properties and add or remove 'user.name' in 				    'additionalProperties'.
                            Default value is true.
--enable-fips-mode          Enable FIPS mode for plugins in USGov realms.
                            Format is --enable-fips-mode=true|false (for example, --enable-fips-mode=false).
                            Modify /etc/bashrc and create a line with ENV_AGENT_PLUGIN_FIPS_APPROVED=true or false.
                            Without this parameter script won't change anything in /etc/bashrc file.
--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. All proxy parameters are optional.
--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-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").
--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").
--use-agent-installer-path  Use this file to setup Management Agent. Optional parameter.
                            If exists, script won't try to find installation files in current folder.
--use-java-path             Use the Java Installation on this path to set up Management Agent. Optional parameter
                            Format is --use-java-path="JAVA_PATH" 
                            (for example, --use-java-path=/Library/Java/JavaVirtualMachines/jdk1.8.0361.jdk/Contents/Home).
--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_macos.sh --diagnostic
    オペレーティング・システムおよびエージェント・タイプに応じて、結果は次のようになります。

    診断に失敗しました:

    ======================================================================================================
    Diagnostic Summary
    ======================================================================================================
    User has sudo/root privileges? : Yes
    Certified OS? : Yes
    Meets minimum disk requirements? : Yes
    Meets minimum memory requirements? : Yes
    Able to reach OCI endpoint? : Yes
    Certificate verification has been passed? : Yes
    Is clock sync with OCI platform? : Yes
    Available Java for agent installation ? : Yes
    Management Agent installer available? : No
    	Script JMS_YourFleetName_macos.sh can't find the Management Agent installer /kkk.
    	Check if the path /kkk exists and check the '--use-agent-installer-path' parameter.
    Existing Management Agent has been detected? : No
    ================================================================================
    Diagnostics have failed. Please resolve all issues and run script JMS_YourFleetName_macos.sh again.
    Please refer troubleshooting guide https://docs.oracle.com/en-us/iaas/jms/doc/troubleshooting.html for more details.
    
    A copy of this installation log can be found at /Library/Oracle/JMSInstallScript/JMSInstallScriptLogs-<date>.log
    
    診断は正常に完了:
    ======================================================================================================
    Diagnostic Summary
    ======================================================================================================
    User has sudo/root privileges? : Yes
    Meets minimum disk requirements? : Yes
    Meets minimum memory requirements? : Yes
    Able to reach OCI endpoint? : Yes
    Certificate verification has been passed? : Yes
    Is clock sync with OCI platform? : Yes
    Existing Management Agent has been detected? : No
    Available Java for agent installation ? : Yes
    Management Agent installer available? : Yes
    ======================================================================================================
    Diagnostics have finished running and no error occurred.

    診断中にチェックされる条件の完全なリスト、および解決策または推奨事項については、エージェント・インストール診断の実行を参照してください。

  2. インストールスクリプトおよび管理エージェントソフトウェアを保存したフォルダに移動します。次のコマンドを使用してスクリプトを実行します。
    $ sudo bash ./JMS_YourFleetName_macos.sh
    • インストールが成功すると、次のようなメッセージが表示されます。
      ...
      Management Agent installation has been completed with 'Java Usage Tracking service plugin (Service.plugin.jms)'
      JMS basic features will be enabled on this instance.
      Management Agent installation has been completed with 'Java Management service plugin (Service.plugin.jm)'
      JMS advanced features can be enabled on this instance.
      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使用状況トラッキングおよびJava Management Serviceプラグインを手動でデプロイします。または、JMSプラグイン・デプロイメントとともにエージェントを再インストールし、--forceパラメータを指定してスクリプトを実行します。
  3. (オプション)管理エージェントが実行されているかどうかを確認するには、次のように入力します。
    $ sudo launchctl print system/com.oracle.macs.agent.mgmt_agent | grep state
    次の結果が表示されます。
    state = running

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

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